Boilerplate SPA with React, Redux, Immutable, Babel, Eslint, & Mocha
This boilerplate app has all the pieces set up for what I think is a top-shelf front-end JavaScript Single Page Application.
- react for rendering
- redux for state management
- react-router for client-side routing
- immutable for an efficient data store
- babel for the latest & greatest JavaScript
- webpack for bundling modules for the browser
- mocha & chai for testing
- eslint for catching common bugs and style issues
- node-sass for better CSS
- autoprefixer-loader to never have to write vendor prefixed CSS rules again
A Comprehensive Guide to Test-First Development with Redux, React, and Immutable helped me put a lot of this together.
npm installto install all the dependencies.npm startto start a webpack-dev-server on http://localhost:4000. The dev server will live-reload the page when you save changes to the code.npm run buildto build the app.js file for the browser.npm run watchto build the app.js file for the browser and rebuild it when you save changes to the code.npm testto run the tests.npm run test-watchto run the tests and rerun the tests when you save changes to the code.