mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
docs(cli): update commit-lint config
This commit is contained in:
parent
4604f4c647
commit
2d979d3977
@ -36,15 +36,10 @@ yarn add @vant/cli --dev
|
||||
"test": "vant-cli test",
|
||||
"lint": "vant-cli lint",
|
||||
"build": "vant-cli build",
|
||||
"prepare": "husky install",
|
||||
"release": "vant-cli release",
|
||||
"build-site": "vant-cli build-site"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"commit-msg": "vant commit-lint"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx,vue}": "eslint --fix",
|
||||
"*.{vue,css,less,scss}": "stylelint --fix"
|
||||
@ -70,4 +65,3 @@ yarn add @vant/cli --dev
|
||||
- [目录结构](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/directory.md)
|
||||
- [桌面端组件](https://github.com/youzan/vant/tree/dev/packages/vant-cli/docs/desktop.md)
|
||||
- [更新日志](https://github.com/youzan/vant/tree/dev/packages/vant-cli/changelog.md)
|
||||
|
||||
|
@ -59,3 +59,7 @@ npx vant-cli dev
|
||||
## commit-lint
|
||||
|
||||
校验 commit message 的格式是否符合规范,需要配合 `husky` 在提交 commit 时触发。
|
||||
|
||||
```bash
|
||||
npx husky add .husky/commit-msg 'npx --no-install vant-cli commit-lint $1'
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user