react组件开发
1.组件创建脚手架
create-react-library是一个用来创建react组件库的cli,中文文档
隐式配置
- 如何关闭css modules?
创建好工程后,修改根目录下的package.json中scripts节点下的start和build命令
"build": "microbundle-crl --css-modules false --no-compress --format modern,cjs",
"start": "microbundle-crl --css-modules false watch --no-compress --format modern,cjs",
- 如何使用scss来开发组件样式?
安装node-sass到devDependencies即可,不需要其他额外配置
yarn add node-sass -D
2. 组件文档生成工具
https://github.com/styleguidist/react-styleguidist