We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html
参考: https://github.com/conventional-changelog/commitlint
npm install -D @commitlint/{config-conventional,cli} husky
"husky": { "hooks": { "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } }, "commitlint": { "extends": [ "@commitlint/config-conventional" ] }
npm install -D commitizen cz-conventional-changelog
"scripts": { ... "commit": "git-cz" }
"config": { "commitizen": { "path": "node_modules/cz-conventional-changelog" } }
git add .
npm run commit
参考: https://github.com/CookPete/auto-changelog
npm install -D auto-changelog
{ "template": "CHANGELOG.template", "unreleased": true, "commitLimit": false }
# Changelog {{#each releases}} ## [{{title}}] {{#commit-list commits heading='### Breaking Change' message='\[break\]'}} - {{subject}} [{{shorthash}}]({{href}}) {{/commit-list}} {{#commit-list commits heading='### New Feature' message='feat: ' exclude='\[break\]'}} - {{subject}} [{{shorthash}}]({{href}}) {{/commit-list}} {{#commit-list commits heading='### Bug Fix' message='fix: ' exclude='\[break\]'}} - {{subject}} [{{shorthash}}]({{href}}) {{/commit-list}} {{/each}}
"scripts": { ... "changelog": "auto-changelog", "version": "auto-changelog -p && git add CHANGELOG.md" }
npm run changelog
执行 npm version 时会自动生成带所发布版本号的 changelog
npm version
The text was updated successfully, but these errors were encountered:
No branches or pull requests
commit message 规范
http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html
自动校验 commit message
参考: https://github.com/conventional-changelog/commitlint
npm install -D @commitlint/{config-conventional,cli} husky
通过交互界面生成符合规范的 commit message
npm install -D commitizen cz-conventional-changelog
git add .
和npm run commit
自动生成 changelog
参考: https://github.com/CookPete/auto-changelog
npm install -D auto-changelog
npm run changelog
执行
npm version
时会自动生成带所发布版本号的 changelogThe text was updated successfully, but these errors were encountered: