0.0.6 • Published 2 years ago
adorecherish-generator-component v0.0.6
generator-component
generator-component,基于react storybook 搭配webpack5 的ui公共组件。
统一开发工具
VScode https://code.visualstudio.com/
如何使用
1:nodejs version >= 12 目前推荐使用v14.17.0(服务器所配置node环境)
2:执行npm i 执行完成后会默认触发husky install 生成husky默认配置
3:启动项目
npm run start
4:prettier代码格式
npm run prettier
5:提交代码前
npm run husky
使用sourcetree提交需要手动添加path参数
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
PATH="/Users/adore/.nvm/versions/node/v14.17.0/bin:$PATH" // 这是手动添加的path 可以通过where npm获取
npm run lint
6:单元测试
npm run jest
git提交日志规范
http://wiki.corp.rs.com/pages/viewpage.action?pageId=65413554
已完成
- ✅ 🎉react
- ✅ 🎉eslint + fork-ts
- ✅ 🎉husky
- ✅ 🎉jest + jest-cucumber
- ✅ 🎉storybook
TODO
- theme 主题 自动切换
整体架构
http://wiki.corp.rs.com/pages/viewpage.action?pageId=65428572
单元测试
https://jestjs.io/docs/getting-started