react component development starter kit
npm install test-framework用于开发 react 组件的脚手架
* 推荐 >> 使用steamerjs安装
``javascript
npm i -g steamerjs steamer-plugin-kit
npm i -g steamer-react-component
steamer kit
`
* 或直接从github clone 下来
bash
npm i
`$3
`bash
npm run start 或 npm run dev// 打开链接,查看 demo
localhost:9000
`> ps:此处在开启开发模式下默认会自动打开浏览器。
$3
`bash
npm run lint
`> ps:此处的扫描在开发模式下是默认开启的,不需要手动执行lint。
$3
`bash
// 使用 jest 测试
npm run test 或 npm run jest// 使用 karma 测试
npm run karma
`$3
`bash
// 使用 babel 编译
npm run dist 或 npm run babel// 使用 webapck 编译
npm run webpack
`> ps:关于两种测试方式和两种编译方式的区别可查看这里。
编写demo
直接在
/example/src/container/`目录下调整关于组件的使用逻辑和范例样式即可,如范例中该目录下的index.js和index.less文件。