mirror of
https://github.com/ZJDoc/GitGuide.git
synced 2026-07-29 15:20:25 +08:00
docs(tool): add commitizen/commitlint/huksy/conventional-changelog/generator-standard-readme
This commit is contained in:
@@ -1,18 +1,18 @@
|
|||||||
|
|
||||||
# [Commitizen]信息交互工具
|
# [Commitizen]信息提交
|
||||||
|
|
||||||
[Commitizen](http://commitizen.github.io/cz-cli/)是一个提交日志工具,辅助开发者使用提交规则
|
[Commitizen](http://commitizen.github.io/cz-cli/)是一个提交日志工具,辅助开发者使用提交规则
|
||||||
|
|
||||||
## 预配置
|
## 预配置
|
||||||
|
|
||||||
需要安装`NodeJS`,参考:[nodeJS安装](https://hexo-guide.readthedocs.io/zh_CN/latest/node/nodeJS%E5%AE%89%E8%A3%85.html)
|
* 安装`NodeJS`
|
||||||
|
|
||||||
## 安装`Commitizen`
|
## 安装Commitizen
|
||||||
|
|
||||||
# 全局安装
|
# 全局安装
|
||||||
$ npm install -g commitizen
|
$ npm install -g commitizen
|
||||||
|
|
||||||
## 安装`Adapter`
|
## 安装Adapter
|
||||||
|
|
||||||
`Commitizen`支持多种不同的提交规范,可以安装和配置不同的适配器实现
|
`Commitizen`支持多种不同的提交规范,可以安装和配置不同的适配器实现
|
||||||
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
# [CommitLint][Husky]消息校验工具
|
# [CommitLint][Husky]消息校验
|
||||||
|
|
||||||
参考:[commitlint](https://conventional-changelog.github.io/commitlint/#/)
|
|
||||||
|
|
||||||
使用`commitizen`可以规范化提交信息,同样的,可以设置工具来检查提交信息是否符合格式要求
|
使用`commitizen`可以规范化提交信息,同样的,可以设置工具来检查提交信息是否符合格式要求
|
||||||
|
|
||||||
@@ -123,3 +121,7 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
script:
|
script:
|
||||||
- commitlint-travis
|
- commitlint-travis
|
||||||
|
|
||||||
|
## 相关阅读
|
||||||
|
|
||||||
|
* [commitlint](https://conventional-changelog.github.io/commitlint/#/)
|
||||||
@@ -1,23 +1,9 @@
|
|||||||
|
|
||||||
# [standard-version]版本自动化及CHANGELOG生成
|
# 版本自动化及CHANGELOG生成
|
||||||
|
|
||||||
参考:
|
|
||||||
|
|
||||||
[conventional-changelog/standard-version](https://github.com/conventional-changelog/standard-version)
|
|
||||||
|
|
||||||
[Closing issues using keywords](https://help.github.com/en/articles/closing-issues-using-keywords)
|
|
||||||
|
|
||||||
[如何维护更新日志](https://keepachangelog.com/zh-CN/1.0.0/)
|
|
||||||
|
|
||||||
## conventioanl-changelog
|
|
||||||
|
|
||||||
参考:
|
|
||||||
|
|
||||||
[conventional-changelog-cli](https://www.cnblogs.com/zivxiaowei/p/10089201.html)
|
|
||||||
|
|
||||||
使用工具[conventional-changelog](https://www.npmjs.com/package/conventional-changelog)进行`CHANGELOG`文件的自动生成
|
使用工具[conventional-changelog](https://www.npmjs.com/package/conventional-changelog)进行`CHANGELOG`文件的自动生成
|
||||||
|
|
||||||
### 安装
|
## 安装
|
||||||
|
|
||||||
全局安装:
|
全局安装:
|
||||||
|
|
||||||
@@ -25,7 +11,7 @@
|
|||||||
$ npm install -g conventional-changelog-cli
|
$ npm install -g conventional-changelog-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
### 使用
|
## 使用
|
||||||
|
|
||||||
基本使用命令如下:
|
基本使用命令如下:
|
||||||
|
|
||||||
@@ -47,9 +33,7 @@ $ conventional-changelog -p angular -i CHANGELOG.md -s -r 0
|
|||||||
|
|
||||||
* 参数`-r`默认为`1`,设为`0`将重新生成所有版本的变更信息
|
* 参数`-r`默认为`1`,设为`0`将重新生成所有版本的变更信息
|
||||||
|
|
||||||
### 快捷方式
|
## 快捷方式
|
||||||
|
|
||||||
参考:[五、生成 Change log](http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html)
|
|
||||||
|
|
||||||
在工程`package.json`中加入以下脚本
|
在工程`package.json`中加入以下脚本
|
||||||
|
|
||||||
@@ -66,3 +50,15 @@ $ conventional-changelog -p angular -i CHANGELOG.md -s -r 0
|
|||||||
```
|
```
|
||||||
$ npm run changelog
|
$ npm run changelog
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 相关阅读
|
||||||
|
|
||||||
|
* [conventional-changelog/standard-version](https://github.com/conventional-changelog/standard-version)
|
||||||
|
|
||||||
|
* [Closing issues using keywords](https://help.github.com/en/articles/closing-issues-using-keywords)
|
||||||
|
|
||||||
|
* [如何维护更新日志](https://keepachangelog.com/zh-CN/1.0.0/)
|
||||||
|
|
||||||
|
* [conventional-changelog-cli](https://www.cnblogs.com/zivxiaowei/p/10089201.html)
|
||||||
|
|
||||||
|
* [五、生成 Change log](http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html)
|
||||||
@@ -77,3 +77,7 @@ nav:
|
|||||||
- 远程分支替换本地分支: git/advanced/远程分支替换本地分支.md
|
- 远程分支替换本地分支: git/advanced/远程分支替换本地分支.md
|
||||||
- 为每个项目单独设置用户名和邮箱: git/advanced/为每个项目单独设置用户名和邮箱.md
|
- 为每个项目单独设置用户名和邮箱: git/advanced/为每个项目单独设置用户名和邮箱.md
|
||||||
- ERROR: git/error.md
|
- ERROR: git/error.md
|
||||||
|
- '[Commitizen]消息提交': tool/commitizen.md
|
||||||
|
- '[CommitLint][Husky]消息校验': tool/commitlint-husky.md
|
||||||
|
- README生成器: tool/generator-standard-readme.md
|
||||||
|
- '版本自动化及CHANGELOG生成': tool/standard-version.md
|
||||||
Reference in New Issue
Block a user