1.1.2 • Published 8 years ago
rubix-init v1.1.2
rubix-init
Ant Design boilerplate generator.
Feature
- Generate a webpack workflow based boilerplate.
- support ES2015 and less.
- Local development via dora, support proxy, HMR and unit test.
- support custom webpack.config,examples.
More usage: http://ant-tool.github.io/
Install
$ npm i antd-init -g
Usage
Generate boilerplate.
$ mkdir foo && cd foo
$ antd-init
// or with specify type
$ antd-init --type plain-react
$ antd-init --type redux
Start development server.
$ npm start
Build.
$ npm run build
Test.
$ npm test
Lint.
$ npm run lint
Don't work in IE8 ?
Since IE8 is don't supported in main react community, you should do follow steps to make it work:
Open
package.json
Modify dependency version.
- "react": "^15.0.2",
- "react-dom": "^15.0.2",
- "react-router": "^2.0.1",
- "react": "0.14.x",
- "react-dom": "0.14.x",
"react-router": "2.3.x"
Remove hmr plugin. ```diff
- "start": "dora -p 8001 --plugins \"webpack,hmr,proxy,livereload?enableJs=false&injectHost=127.0.0.1,browser-history?index=/src/entries/index.html\"",
- "start": "dora -p 8001 --plugins \"webpack,proxy,livereload?enableJs=false&injectHost=127.0.0.1,browser-history?index=/src/entries/index.html\"",
Open
webpack.config.js
, and enable es3ify-loader// Enable this if you have to support IE8.
- // webpackConfig.module.loaders.unshift({
- // test: /.jsx?$/,
- // loader: 'es3ify-loader',
- // });
- webpackConfig.module.loaders.unshift({
- test: /.jsx?$/,
- loader: 'es3ify-loader',
- });
1.1.2
8 years ago