Welcome to the Quartermaster UI repository; a React app, using:
- Flexbox
- Redux (state management)
- React Router
- PostCSS
- DraftJS
For all JS style related things, refer to the JavaScript Style Guide which is forked off Airbnb's JS style guide. Note: The React style guide isn't necessarily up-to date.
Other important rules
- Do not add a UI kit/CSS framework!
$ npm install
$ npm start
- ... wait for
webpack: bundle is now VALID.
in the console - Open up http://qrtrmstr.localhost:8080/
-
Webpack is red Read the stack trace.. fix the issue. It's probably that you need to do an
npm install
because someone added a new package -
Node is being weird Make sure you're on Node 6, and have installed Node via nvm.
nvm use
should fix the issue. NOTE: Our APIs are still using Node v4 -
NPM takes forever to install! YUP!
-
The dev server randomly breaks Known bug... unknown fix. Bounty of 1 beer to whoever solves this problem for good.
- Get Heroku toolbelt (
$ brew install heroku-toolbelt
) - Make sure you have Heroku credentials for UI repo
$ heroku login
- Get Heroku static plugin:
$ heroku plugins:install heroku-cli-static
$ heroku git:remote -a qrtrmstr-ui
$ npm run build
$ heroku static:deploy --remote master
This must be run the first time you try you deploy to staging
$ heroku login
- Get Heroku static plugin:
$ heroku plugins:install heroku-cli-static
$ heroku git:remote -a qrtrmstr-ui-staging -r staging
These commands should be run everytime you want to deploy the dev branch to staging
$ npm run build
$ heroku login
$ heroku static:deploy --remote staging