给大家推荐个react脚手架工具react-cli,跟vue-cli很像,里面模块比较齐全。
它包含了:
1,react全家桶
2,webpack热加载
3,Expressdev server
4,Proxy接口代理
5,Global-Variable全局变量,用来区分线上线下环境
6,ESlint
7,jest with Enzyme, to make unit test for react components easier.
安装步骤:
npm install -g sao
sao yang302/react-cli new-project-name
cd new-project
npm install
npm run dev //开发环境
npm run build //生产环境
npm run build --report //生产环境报告
npm run lint //代码检查
npm test //测试
详细地址: http://www.cnblogs.com/qingfengweb/p/6800396.html
github源码: https://github.com/yang302/react-cli