@ronnieacs/cz-conventional-commit
v5.0.3
Published
Commitizen adapter following the conventional-changelog format, with emojis. π. Forked from https://github.com/pvdlg/cz-conventional-commit
Downloads
8
Maintainers
Readme
cz-conventional-commit
commitizen adapter following the conventional-changelog format, with emojis and additionnal commit types (aliases).
Install as a global utility
npm install --global commitizen @ronnieacs/cz-conventional-commit
Create a .czrc file in your home directory, with the following content:
{
"path": "@ronnieacs/cz-conventional-commit",
"cz-conventional-commit": {
"maxSubjectLength": 72,
"bodyLineLength": 100
}
}
Now cd into any git repository and use git cz
instead of git commit
and you will find the commitizen prompt.
See commitizen documentation for more informations.
Making your repo Commitizen-friendly
npm install --save-dev commitizen @ronnieacs/cz-conventional-commit
./node_modules/.bin/commitizen init @ronnieacs/cz-conventional-commit --save-dev
You can customize cz-conventional-commit in package.json
:
...
"config": {
"commitizen": {
"path": "@ronnieacs/cz-conventional-commit",
"cz-conventional-commit": {
"maxSubjectLength": 72,
"bodyLineLength": 100,
"emoji": true
}
}
}
...
See commitizen documentation for more informations.
Options
| Option | Description | Default |
| ------------------ | ------------------------------------------------------------------------------------------ | ------- |
| maxSubjectLength
| Length at which to truncate the commit head (head includes type, scope, subject and emoji) | 72 |
| bodyLineLength
| Length at which to wrap body lines | 100 |
| emoji
| To add and emoji at the end of the commit message | false
|
Commit types
| Commit Type | Title | Description | Emoji |
|-------------|--------------------------|-------------------------------------------------------------------------------------------------------------|:-----:|
| feat
| Features | A new feature | β¨ |
| fix
| Bug Fixes | A bug Fix | π |
| docs
| Documentation | Documentation only changes | π |
| style
| Styles | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | π |
| refactor
| Code Refactoring | A code change that neither fixes a bug nor adds a feature | π¦ |
| perf
| Performance Improvements | A code change that improves performance | π |
| test
| Tests | Adding missing tests or correcting existing tests | π¨ |
| build
| Builds | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | π |
| ci
| Continuous Integrations | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | βοΈ |
| chore
| Chores | Other changes that don't modify src or test files | β»οΈ |
| revert
| Reverts | Reverts a previous commit | π |
Commit aliases
Aliases are additionnal commit types that will be formatted to follow AngularJS Commit Message Conventions and automatically set some fields.
For example when choosing initial
, cz-conventional-commit
will automatically set:
- the standard type to
feat
- the
scope
to empty - the
subject
to 'Initial commit π' - the
issues
to empty - the
breaking
to empty
The commit message will be feat: Initial commit π
.
| Commit Type | Type | Scope (default) | Subject (default) | Emoji |
|--------------------|---------|-----------------|-------------------|:-----:|
| initial
| feat
| empty
| Initial commit | π |
| dependencies
| fix
| package | - | β« |
| peerDependencies
| fix
| package | - | β¬οΈ |
| devDependencies
| chore
| package | - | πΌ |
| metadata
| fix
| package | - | π¦ |
Related
- conventional-changelog-metahub - List of conventional commit types and aliases for this module