JavaScript package.json里添加git-cz

git-cz官网

0.目的 => 替代git commit, 丰富提交的内容

1.安装包

npm install commitizen cz-conventional-changelog --save-dev

2.修改package.json

"scripts": {
    "dev": "webpack-dev-server --host 0.0.0.0 --inline --progress",
    "commit": "git-cz"
  },

3.修改package.json

 "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  }

4.效果

posted @ 2020-07-22 11:17  荣光无限  阅读(1043)  评论(0编辑  收藏  举报