- 创建项目
mkdir component-name && cd $_
npx create-react-library
- 开发
npm start # runs rollup with watch flag
- 编写 Example
# (in another tab)
cd example
npm start # runs create-react-app dev server
- publish to NPM
# note this will build `commonjs` and `es`versions of your module to dist/
npm publish
- Github Pages
npm run deploy
ref: https://github.com/transitive-bullshit/create-react-library