π Just use emoji to commit your message and generate CHANGELOG!
# install it globally
npm i git-flow-emoji -g
# in your project
git-flow init
git add .
npm run commit
npm version <version>
You can configure your commit types in .cz-config.js
file.
module.exports = {
// ...
types: [
{
value: ':sparkles: feat',
name: 'β¨ A new feature',
},
]
};
Change the commit message when release.
# .npmrc
tag-version-prefix="v"
message=":bookmark: release: release %s"
More details you can find in this repo: https://github.com/conventional-changelog/conventional-changelog
There are some recommended types to be used:
When you develop a new feature of project, you better to commit you messages like this:
# first commit.
# it will be write into CHANGELOG because of type β¨`:sparkles: feat`.
:sparkles: feat: add new feature
# other commits about this feature.
# they will not to be write into CHANGELOG because of type `:construction: WIP`.
:construction: WIP: optimize this feature
:construction: WIP: fix some bugs about this feature
# it will be write into CHANGELOG because of type π`:bug: fix` or π`:ambulance: hotfix`.
:bug: fix: fix some bugs
:ambulance: hotfix: emergency fix
# it will be write into CHANGELOG because of type π`:lipstick: style`.
:lipstick: style: change style
# it will be write into CHANGELOG because of type π¨`:hammer: refactor style`.
:hammer: refactor: rewrite the code
You can see the descriptions of types to decide which type to be used.
If you see some garbled chart instead of emoji when you run npm run commit
, you could install Windows Terminal in Microsoft store to fix it.
Just enjoy it!