commitizen使用

2020-08-06  本文已影响0人  NicksKK

使用 npm run commit 提交代码 ~

1、安装插件

npm i -D commitizen cz-conventional-changelog

2、添加 package.json

"scripts": {
  ...
  "commit": "git-cz"
},
"config": {
  "commitizen": {
    "path": "./node_modules/cz-conventional-changelog"
  }
},

3、开始使用

feat:新功能(feature)
fix:修补bug
docs:文档(documentation)
style: 格式(不影响代码运行的变动)
refactor:重构(即不是新增功能,也不是修改bug的代码变动)
test:增加测试
chore:构建过程或辅助工具的变动
上一篇下一篇

猜你喜欢

热点阅读