看到 vue 源码中使用的
"scripts": {
commit": "git-cz"
},
"devDependencies": {
...
"commitizen": "^2.9.6",
"conventional-changelog": "^1.1.3",
"cz-conventional-changelog": "^2.0.0",
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
npm install --save-dev cz-conventional-changelog