This will be a React Boilerplate for I have made for my react projects. Its inspired by Pete Hunt's React HowTo.
I call it React Minimal Boilerplate as it has a minimal set of libraries, when it comes to adding a JavaScript library to my FrontEnd projects I deeply believe in: If you do not need it do not use it.
Libraries included in the project:
- React, React-DOM : 15.3.1
- React-Router: 2.7.0
- immutable: 3.8.1
- Webpack: 1.13.2
- Babel: 6.x
- CSS-Modules for styling
- Unit Test Coverage: enzyme:2.4.1, mocha:3.0.2, chai:3.5.0, sinonjs:1.17.5
- ESLint: 3.4.0, using eslint-config-airbnb:10.0.0
- Flow: 0.22.1
Other small tweaks I did for myself:
- In development mode all http requests with
/api
will be redirected tohttp://localhost:8080
- Added
normalize.css
to the project - The project uses
/template/index.html
as template to createindex.html
in dev mode and during build
To use boilerplate, follow these steps:
- git clone https://github.com/ChilliApple/react-simplified-boilerplate.git
- rm -rf .git
- npm install
- npm start