antd重构现有的游戏管理后台
基于现有的脚手架开发 react-starter-kit
$ git clone https://github.com/songzhengxu/antd-game-admin
$ cd react-starter-kit
$ npm install
//启动项目
$ npm run dev
将自动打开浏览器http://127.0.0.1:3000
$ 编译和打包都会自动运行代码检查
也可以配置编辑器,在编码时实时检查语法 如: atom需要安装linter和linter-eslint这两个插件, 装好后重启生效.
$ npm run test // 运行单元测试
$ npm run coverage // 运行覆盖率测试
单元测试在控制台输出报告,覆盖率测试将在项目根目录中创建coverage文件夹来输出测试报告, 进入coverage/lcov-report 中,打开index.html 能够在浏览器中查看更加详细的覆盖率测试报告
$ npm run build
导出的代码在项目根目录中
react-starter-kit/
├─src // 源文件目录
│ ├─Action
│ ├─Assets // 图片资源
│ ├─Component
│ │ └─Common
│ ├─Config
│ ├─Iconfont // 字体
│ ├─Reducer
│ ├─Style
│ ├─Template // html模板
│ └─utils
└─test // 测试用例目录
├─Action
├─Component
└─Reducer