@168496714/create-react-component 中文文档教程
create-react-component
创建 React 组件的 cli 只需
feature
零配置
包括
- webpack4 to dev/build package
- React 16.2
- babel
- eslint
- flow for static type check
- Enzyme and ava for test
usage
npm install @168496714/create-react-component -g
create-react-component <project-name>
cd <project-name>
yarn // or npm install
dev
npm run build
// 默认运行在 3000
build
npm run build
//默认条目 build/main.js
structure
├── package. JSON ├──公开
│ ├── app.js │ └── index.html ├── 服务器 │ └── index.js ├── 来源 │ └── index.js // 你的组件入口 ├── 测试 │ ├── 帮手 │ └── 测试.js ├── 网页包 │ ├── webpack.dev.js │ └── webpack.prod.js
TODO
[ ] 可配置,如 eslint,prop-types 或 flow
[ ] 智能,如 dev port tip,npm/yarn
[ ] 转换成脚本
[ ] 更多,等你指点
create-react-component
a cli to create react component simply
feature
zero config
includes
- webpack4 to dev/build package
- React 16.2
- babel
- eslint
- flow for static type check
- Enzyme and ava for test
usage
npm install @168496714/create-react-component -g
create-react-component <project-name>
cd <project-name>
yarn // or npm install
dev
npm run build
// default run in 3000
build
npm run build
//default entry build/main.js
structure
├── package.json ├── public
│ ├── app.js │ └── index.html ├── server │ └── index.js ├── src │ └── index.js // entry of your component ├── test │ ├── helpers │ └── test.js ├── webpack │ ├── webpack.dev.js │ └── webpack.prod.js
TODO
[ ] configurable, such as eslint , prop-types or flow
[ ] smart , such as dev port tip, npm/yarn
[ ] conversion into script
[ ] more ,waiting you to point me out