React components library
npm install small-roach-componentssmall-roach-component 是一套组件库,使用 React Hooks 和 typescript
,由浅入深的提高自己的 React 和 typescript 水平,它的官网地址是
alien-chen.github.io
~~~javascript
npm install small-roach-components --save
~~~
~~~javascript
// 加载样式
import 'small-roach-components/dist/index.css';
// 引入组件
import { Button } from 'small-roach-components'
~~~
* 🔥typescript with React Hooks
* ⛑️使用 react-testing-library 完成单元测试
* 📚使用 storybook 本地调试和生成文档页面
* 📦使用第三方库扩充组件-(react-fontawesome, react-transition-group)
* 🌹样式(Sass)文件从零开始,掌握大型应用的 CSS 组织方法
* 🎉涉及全部流程,包括最后的 npm publish,husky提交发布前验证,发布文档站点等
~~~bash
//启动本地环境
npm run stroybook
//跑单元测试
npm test
//build可发布静态文件
npm run build
//发布到 npm
npm run publish
~~~