Boilerplate for myself.
Please use create-react-app instead. Much better.
node.js v6.*+
- Yarn
- Webpack
- babel-preset-react-app
- jest for testing
- Support Sass for style.
- CSS Modules enabled by default.
- If you have some global style please put that in
src/globalStyledirectory. CSS Modules exclude the style come from there. - Styles from
node_modulesalso exclude to CSS Modules. - Auto BEM class naming.
- Jest
Using identity-obj-proxy to proxy classname to snapshot.
Write test for React by using snapshot
| Command | Description |
|---|---|
| yarn start | start development |
| yarn run test | stat testing |
| yarn run build | build for production |
- Webpack config for production.
- Write some tests by using jest for boilerplate reference.
- Add Flow for static type checking.
- Add eslint-plugin-jsx-ally.
- Find a good way to separate global and local style in css modules.
- Common code splitting.