Skip to content

survivejs/react-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

91dbe6a · May 11, 2017

History

62 Commits
May 15, 2016
May 30, 2016
Apr 27, 2016
May 11, 2017
Jul 15, 2016
Aug 24, 2016
Jan 17, 2017
Jun 23, 2016
Jan 17, 2017
Jan 4, 2017
Jan 4, 2017

Repository files navigation

react-boilerplate - Boilerplate for "SurviveJS - React"

See SurviveJS - React for the book.

If you use Vagrant or Cloud9, you'll need to tweak the development server port as instructed in webpack.parts.js.

Getting Started

  1. npm i - Install dependencies. This might take a while.
  2. npm start - Run development build. If it doesn't start, make sure you aren't running anything else in the same port. In case you are on a Unix platform, you can try PORT=3000 npm start. It will pick up the port from the environment if it's set.
  3. Surf to the port shown at terminal.
  4. Start modifying the code. The browser should pick up the changes.

Advanced Commands

Beyond development, the boilerplate supports other tasks listed below:

  • npm run build - Generates a production build below build/. See the Building with Webpack part for more.
  • npm run deploy - Deploys the contents of the build/ directory below the gh-pages branch.
  • npm run test - Runs tests/ through Karma/Phantom/Mocha once.
  • npm run test:tdd - Runs tests/ in a TDD mode (watches for changes and rebuilds).
  • npm run test:lint - Runs code through ESLint to spot code quality issues.
  • npm run stats - Generates Webpack build statistics. See the Analyzing Build Statistics chapter.