cz-gitmojis
v1.0.5
Published
Commitizen adapter following gitmoji format.
Downloads
11
Readme
About The Project
An adapter that uses the gitmojis package to add the gitmoji standard to commitizen.
Gitmoji is an initiative to standardize and explain the use of emojis on GitHub commit messages.
Using emojis on commit messages provides an easy way of identifying the purpose or intention of a commit with only looking at the emojis used. As there are a lot of different emojis I found the need of creating a guide that can help to use emojis easier.
Usage
This guide assumes you already have commitizen. To add the adaptor run npm i cz-gitmojis
Configuration
package.json
Like commitizen, you specify the configuration of cz-conventional-changelog through the package.json's config.commitizen
key.
{
// ... default values
"config": {
"commitizen": {
"path": "./node_modules/cz-gitmojis",
"disableSubjectLowerCase": false,
"maxHeaderWidth": 100,
"maxLineWidth": 100,
"defaultType": "",
"defaultSubject": "",
"defaultBody": "",
"defaultIssues": "",
"types": {
...
"feat": {
"description": "A new feature",
"title": "Features"
},
...
}
}
}
// ...
}
Environment variables
The following environment variables can be used to override any default configuration or package.json based configuration.
- CZ_TYPE = defaultType
- CZ_SUBJECT = defaultSubject
- CZ_BODY = defaultBody
- CZ_MAX_HEADER_WIDTH = maxHeaderWidth
- CZ_MAX_LINE_WIDTH = maxLineWidth
Commitlint
If using the commitlint js library, the "maxHeaderWidth" configuration property will default to the configuration of the "header-max-length" rule instead of the hard coded value of 100. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Your Name - @JollyShopland - [email protected]
Project Link: https://github.com/jolbol1/cz-gitmojis