0.1.2 • Published 3 years ago
small-roach-components v0.1.2
SmallRoach component library
使用 React+typescript 打造自己的组件库
small-roach-component 是一套组件库,使用 React Hooks 和 typescript ,由浅入深的提高自己的 React 和 typescript 水平,它的官网地址是 alien-chen.github.io
安装最后已经发布的组件库来试试
npm install small-roach-components --save
使用
// 加载样式
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提交发布前验证,发布文档站点等
一些本地开发命令
//启动本地环境
npm run stroybook
//跑单元测试
npm test
//build可发布静态文件
npm run build
//发布到 npm
npm run publish