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 install
to install all the dependencies.npm start
to 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 build
to build the app.js file for the browser.npm run watch
to build the app.js file for the browser and rebuild it when you save changes to the code.npm test
to run the tests.npm run test-watch
to run the tests and rerun the tests when you save changes to the code.