A simple boilerplate based on create-react-app but add mobx, react-router, stylelint and so on.
Provide two demos help you quick start.
- Add react-router use hash router
- Mobx
- Mobx-react
- All features in create-react-app
- HMR for react
- Mock support(use mockjs)
- Use eslint-config-airbnb instead of eslint-config-react-app
- lint code in pre-commit by husky and lint-staged
- prettier
- eslint
- stylelint
- Add .editorconfig
- You can import folders in src directly instead of relative paths like
import SomeComponent from '@/Components/SomeComponent'
- Code spliting by react-loadable
- Drop console when build
- Support less
- Add reset css
- Support decorators
- Use antd as UI library
- Use antd import on demand
- Add basic layout
- Add exception component to handle 403, 404, 500 error(copy ant-design-pro)
- Add isIe9 utility function
- Add two demos help you quick start
- Use commitizen to format your commit message
- Use commitlint to lint your commit message
- Use conventional-changelog-cli to generate CHANGELOG.md
- creat-react-app@2.1.1
- react@16
- mobx@4
- react-router@4
- ant-design@2
my-app
├── README.md
├── node_modules
├── package.json
├── package-lock.json
├── .gitignore
├── .babelrc
├── .editorconfig
├── .eslintrc.json
├── .stylelintrc.json
├── .prettierrc.json
├── .prettierignore
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
├── config (webpack config)
├── scripts
└── src
├── assets (global assets)
├── components (global components)
├── config (global config)
├── layouts (global layouts)
├── routes (first level routes)
│ ├── 404
│ ├── demo
| │ ├── routes (second level routes)
| | | ├── products
| | | ├── todo
| | | └── todoDetail
| │ ├── Demo.js
| │ └── index.js
│ └── home
├── stores (global stores)
├── utils (global utils)
├── App.js
├── index.css
└── index.js
- IE9+
- Modern browsers
git clone https://github.com/kwzm/react-mobx-react-router-boilerplate.git
Runs the app in development mode with mock data. Open http://localhost:3000 to view it in the browser.
Runs the app in development mode without mock data.
Builds the app for production to the build
folder.
- IE9~IE10 don't support dev enviroment.