摘要:提高開發效率簡單的集成到了生成的項目上項目地址一集成管理團隊的信息步奏安裝添加規則根目錄添加文件,并添加規則,必須為格式添加到中安裝并添加命令在中添加查看詳情二集成管理團隊編寫規范步奏安裝
提高開發效率
簡單的集成到了vue-cli生成的項目上 項目github地址
A Vue.js projectBuild Setup
# install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report
For a detailed explanation on how things work, check out the guide and docs for vue-loader.
一、集成validate-commit-msg管理團隊的commit信息
步奏安裝validate-commit-msg
npm i --D validate-commit-msg
添加commit規則
1.根目錄添加.vcmrc文件,并添加規則,必須為JSON格式
{ "types": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"], "scope": { "required": false, "allowed": ["*"], "validate": false, "multiple": false }, "warnOnFail": false, "maxSubjectLength": 100, "subjectPattern": ".+", "subjectPatternErrorMsg": "subject does not match subject pattern!", "helpMessage": "", "autoFix": false }
2.添加到package.json中
{ "config": { "validate-commit-msg": { /* your config here */ } } }
安裝husky,并添加commitmsg命令
npm i --D husky
在package.json中添加"commitmsg": "validate-commit-msg"
{ "scripts": { "commitmsg": "validate-commit-msg" } }
查看validate-commit-msg詳情
二、集成stylelint管理團隊css編寫規范
步奏安裝stylelint, stylelint-order, stylelint-processor-html, stylelint-scss, stylelint-webpack-plugin
// stylelint-order: 屬性順序插件 // stylelint-processor-htm: 檢查html中的