React SPA Boilerplate
April 16, 2017 · View on GitHub
React SPA boilerplate for open source project
Features
- Simple
index.htmlloadingbundle.js. - Starter
index.jsxfor React. - All code following Airbnb's JavaScript (ES6) style guide with ESlint.
- Webpack dev server with automatic reloading. Start with:
npm start. - Deployment build with
npm run build.
Components
- Babel for ES6 support.
- Chai as BDD / TDD assertion library.
- ESlint for ES6 linting using Airbnb's JS style guide.
- Mocha as test framework.
- Nyc for test coverage
- React as front-end view library.
- Webpack for bundling of JavaScript modules.
Getting Start
Run the following commands in your terminal
git clone https://github.com/LucasBassetti/react-spa-boilerplate.git
cd react-spa-boilerplate
npm install
npm start
Then open http://localhost:8080/ on your web browser.
Testing
- Run
npm testfor simple test. - Run
npm run test:watchfor watch tests. - Run
npm run test:coveragefor test coverage. This will generate acoveragefolder. Open theindex.htmlfile in this folder to check the results.
Deploying
For deployment, run npm run build and upload build/ to your server.
License
MIT · Lucas Bassetti