🔮 hatch-react
A react starter kit.
🛠 Requirements:
- Node ^8.8.0
- Yarn ^1.2.1
⚙️ Project Configuration
Before starting:
- Update the
package.json
name field with the project name - Update the
.travis.yml
file with the correct api keys and instance names for deploying - Update the
app/sitemap.js
file with the correct hostname for sitemap generation- As you develop the app, make sure to keep updating the sitemap configuration
🏎 Get Started
- Clone the repo
- Make sure yarn is up to date then run
yarn
to install deps
FE Development
- Run
yarn start:development
to start a dev server - Run
yarn storybook
to run Storybook (our component development environment) - Run
yarn eslint
lint JavaScript files - Run
yarn stylelint
lint style files - Run
yarn test
to run tests - Run
yarn prettier:watch
to auto format as you work
Node Development
- Run
yarn build:development
to build the front end in develpment mode - Or, run
yarn build:production
to build the front end in production mode - Then, you can run
yarn start:watch
to start the Node server and watch for changes
Bundle Analysis
- Or, run
yarn build:production --env.analyze=true
to run the BundleAnalyzerPlugin + Server to see the dependencies and their sizes.
🚀 Contributing and Releasing
- The
master
branch is the unstable branch. It's where all new issues should base off of. - PRs that get merged to
master
trigger a deploy to staging. - When it's time to do a release, do a QA on staging to make sure it looks good.
- If it's good, pull the latest changes locally from
master
. Versionmaster
by runningyarn version
. - Then
git checkout stable
, thengit merge master
. This will bringstable
up to date. - Next, run
git push origin stable
to push the new version of the app up to GitHub. This will trigger a deploy to beta. - Once the deploy is successful, a QA session should be done on beta. If any bugs are caught and need to be fixed, repeat the process from step 1 down.
- When QA gets the green light, promote the app in the Heroku pipeline from beta to production.
🎉
‼️ Before submitting a Pull Request
- Run
yarn eslint
to check for JS lint errors - Run
yarn stylelint
to check for style lint errors - Run
yarn test
to run tests