| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
Hi there! Thanks for your interest in Razzle. This guide will help you get started contributing.
Razzle is monorepo made up of a several npm packages powered by Lerna.
First, fork the repo to your GitHub account. Then clone your fork to your local machine and make a new branch for your feature/bug/patch etc. It's a good idea to not develop directly on master so you can get updates.
git clone https://github.com/<YOUR_GITHUB_USERNAME>/razzle.git cd razzle git checkout -B <my-branch> NODE_ENV=development yarn install ---ignore-engines # optionally install add-dependencies sudo npm install add-dependencies -g
This will install all node_modules in all the packages and symlink inter-dependencies. Thus when you make local changes in any of the packages you can try them immediately in all the examples. add-dependencies can be used to just add packages to package.json.
git clone https://github.com/<YOUR_GITHUB_USERNAME>/razzle.git
cd razzle
git checkout -b my-feature-branch canary
# or
# git checkout -b my-feature-branch master
# git checkout -b my-feature-branch three
sudo npm install add-dependencies yalc -g
pwd
# /home/oyvind/Documents/GitHub/razzle/
NODE_ENV=development yarn install ---ignore-engines
# to make sure tests pass
yarn test --runInBand
# to add a new example
yarn new-example existingexample with-somefeature
# to work on a example
cd examples/basic
example="$(basename $PWD)"
pushd ../..
# if it is a example with webpack5 you need to do
yarn add -W webpack@5.24.0 html-webpack-plugin@5.2.0
# switch back to webpack4 later to work with webpack4
yarn add -W webpack@4.46.0 html-webpack-plugin@4.5.2
# then
yarn bootstrap-examples $example
popd
yarn build
# if you want to add dependencies to the example
add-dependencies somedependency
yarn restrap
# if you make changes to startserver plugin
pushd ../..
cd packages/razzle-start-server-webpack-plugin
yarn build
popd
# to run example tests with unreleased razzle packages with specific webpack and specific tests
WEBPACK_DEPS="webpack@5.24.0 html-webpack-plugin@5.2.0" PACKAGE_MANAGER="yalc" NPM_TAG="development" yarn test:examples --runInBand -t with-tailwindcss
WEBPACK_DEPS="webpack@4.46.0 html-webpack-plugin@4.5.2" PACKAGE_MANAGER="yalc" NPM_TAG="development" yarn test:examples --runInBand -t with-tailwindcss
# Commands being run during testing puts output and puppeteer screenshots in test-artifacts/
# Trouble with puppeteer?
sudo sysctl -w kernel.unprivileged_userns_clone=1When you want to pull down changes to your fork enter the following into your terminal:
git checkout master
git pull origin masterIf you'd like to add an example, I suggest you duplicate the examples/basic folder yarn new-example basic your-exampleand use that as kind of base template. Before you start adding stuff, go ahead and change the name of the package in the your new example's package.json. Then go back to the project root and run yarn bootstrap-examples your-example. This will make sure that your new example is using your local version of all the packages.
All example folders should be named with-<thing-you-are-demonstrating>. Each example's npm package name (found in it's package.json) should look like razzle-examples-with-<thing-you-are-demonstrating>.
I will do my best to write out my reasoning before closing a PR, but 80% of the time it falls under one of these...
We use the project README to recognize the contributions of members of the project community.
To add a contributor: all-contributors add github_username doc,code
Tweet / DM @jaredpalmer Tweet / DM @nima_arf Tweet / DM @fivethreeo
| Back | FazBrowse Home | New Git URL |