基于 React 18 的移动端组件库
# 安装依赖
npm install
# 启动
npm start
# 构建打包
npm run build
# 构建打包 in watch mode
npm run build:watch
# 检查您的项目是否存在潜在问题
npm run doctor
# 组件名 小写
npm run add [组件名]
# 最后在 src/index.ts 增加组件的引用
export { default as Space } from './components/space';
https://luozyiii.github.io/rc-component
# 手动部署文档
# package.json 升级一下版本号
# 构建 docs
npm run docs:build
# 部署
npm run deploy
# 部署 verdaccio 私域 npm
npm publish --registry http://81.71.98.176:4873
# 撤销
npm unpublish --registry http://81.71.98.176:4873 --force
# 强制撤销指定版本
npm unpublish @leslies/rc-component@0.0.1 --registry http://81.71.98.176:4873 --force
npm install --save-dev jest ts-jest @types/jest @testing-library/react @testing-library/jest-dom
{
"compilerOptions": {
"jsx": "react"
}
}
{
"preset": "ts-jest",
"testEnvironment": "jsdom",
"setupFilesAfterEnv": ["@testing-library/jest-dom/extend-expect"]
}
{
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js"
}
}
module.exports = {};
MIT