美文网首页
package.json里添加git-cz

package.json里添加git-cz

作者: leslie1943 | 来源:发表于2019-04-10 16:29 被阅读0次

git-cz官网

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: 效果

npm run commit后效果图

相关文章

网友评论

      本文标题:package.json里添加git-cz

      本文链接:https://www.haomeiwen.com/subject/bnqoiqtx.html