@constq/qzr-utils 代码中使用inject('$utils')引入utils通用函数
代码中使用inject('$api')引入api接口对象
vite.config的css
/src/mock下配置
/components/common 自动全局引入 加common前缀
src/plugin目录下添加mixin、自定义指令等
.env.dev: 开发联调环境、测试环境
.env.mock: mock环境、前期开发环境
.env.prod: 生产环境
jest.config.js 配置jest
/test目录下编写测试文件
已集成@types/jest eslint-plugin-jest
可以在.husky pre-push中添加 yarn test命令
/utils/preFun
用于配置一些dom或bom相关的方法
postcss-px-to-viewport 自动将px单位转成vw
配置文件postcss.config.js
安装unplugin-auto-import 在vite.config中进行配置
安装vue-global-api eslint依赖 解决eslint报错
rollup-plugin-visualizer 插件 vite.config配置
build会生成stats.html文件
vite-plugin-compression插件
.editorconfig .prettierrc .eslintrc.js
引入@constq/eslint-config-qzr集中管理eslint规范
.husky目录下添加git钩子
lint-staged 让lint只检测暂存区的文件 加快lint速度
.commitlint.config.js文件 配置commit规范
.cz-config.js配置cz规范
使用yarn cz 命令行规范化git commit
使用docker进行部署
修改Dockerfile、nginx.conf文件 暴露的端口
修改nginx.conf文件 /api接口对应的端口
修改package.json docker命令相关的dockerhub名称
执行yarn release进行打包并上传到dockerhub
index.html引入iconfont js文件
在vue文件中
<common-icon :name="whatever"
:style="style">