使用 vue-cli4.x搭建,另加代码格式化的vue模板项目,为了代码整洁、易读,必须遵守文档规范。
- 绝对不允许通过
--no-verify to bypass
这种方式绕过检测!有不合理lint
可以提issue
讨论,整改!
分支 | 描述 | 是否受保护 | push | merge | 备注 |
---|---|---|---|---|---|
master | 正式环境 | yes | no | no | - |
develop | 测试环境 | yes | no | no | - |
dev-xxx | 个人开发分支 | - | - | - | - |
项目目录结构规范一定要看!注释只是样本,独立模块,解藕思想很重要!保证代码整洁
├── public
│ ├── favicon.ico
│ └── index.html
├── src
│ ├── App.vue
│ ├── assets
│ │ ├── images
│ │ │ └── logo.png
│ │ └── styles # 所有公共样式文件必须存放此处
│ ├── components # 所有公共组件必须存放此处,规范如下,每个组件必须建文件夹并附有README
│ │ └── demo
│ │ ├── HelloWorld.vue
│ │ └── README.md
│ ├── main.js
│ ├── router
│ │ └── index.js
│ ├── store
│ │ └── index.js
│ └── views
│ └── home # 一个页面一个文件夹,页面子组件超过两个必须建立components文件夹存放
│ ├── Home.vue
│ └── components
└── vue.config.js
npm install
npm run serve
npm run build
npm run lint