commitmoji v1.0.0
commitmoji
Commitizen adapter formats for emoji-enhanced conventional commits.
commitmoji allows you to easily use emojis in your commits using commitizen.
? Select the type of change you are committing: (Use arrow keys)
❯ feature A new feature
fix A bug fix
docs Documentation only changes
refactor A code change that neither fixes a bug nor adds a feature
chore Other changes that don't modify src or test files
Install
Globally
# Global installation for npm
npm install --global commitmoji
# Global installation for yarn
yarn global add commitmoji
# set as default adapter for your projects
echo '{ "path": "commitmoji" }' > ~/.czrc
Locally
# Local installation for npm
npm install --save-dev commitmoji
# Local installation for yarn
yarn add --dev commitmoji
# Local installation for pnpm
pnpm add --save-dev commitmoji
Add this to your package.json
:
"config": {
"commitizen": {
"path": "commitmoji"
}
}
ℹ️ pnpm
requires you to specify node_modules/commitmoji
.
Usage
$ git cz
Customization
By default, commitmoji
is ready to use immediately after installation. However, users have different needs, so there are several configuration options available to fine-tune it according to project requirements.
Instructions
You can configure commitmoji
either globally in the user's home directory (~/.czrc
) to affect all projects, or locally on a per-project basis in package.json
. Add the config
property to the existing object in either location with your preferred settings for customization.
{
"config": {
"commitmoji": {}
}
}
Customization Options
Types
By default commitmoji
comes preconfigured with the Gitmoji types.
An Inquirer.js choices array:
{
"config": {
"commitmoji": {
"types": [
{
"emoji": "🌟",
"code": ":star2:",
"description": "A new feature",
"name": "feature"
}
]
}
}
}
Scopes
An Inquirer.js choices array:
{
"config": {
"commitmoji": {
"scopes": ["auth", "seed", "deployment"]
}
}
}
Skip Questions
An array of questions you want to skip:
{
"config": {
"commitmoji": {
"skipQuestions": ["scope", "issues"]
}
}
}
You have the option to skip the scope
, body
, issues
, and gitmoji
questions. However, the type
and subject
questions are mandatory.
Customize Questions
An object that includes customized versions of the original questions:
{
"config": {
"commitmoji": {
"questions": {
"body": "This will be shown instead of the original text."
}
}
}
}
Customize the subject max length
The maximum length you want your subject has
{
"config": {
"commitmoji": {
"subjectMaxLength": 200
}
}
}
License
MIT © Nisar Shaikh
22 days ago