step 0: 目的 => 替代git commit, 丰富提交的内容
step 1: 安装包
npm install commitizen cz-conventional-changelog --save-dev
step 2: 修改package.json
"scripts": {
"dev": "webpack-dev-server --host 0.0.0.0 --inline --progress",
"commit": "git-cz"
},
step 3: 修改package.json
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
step 4: 效果

网友评论