Orainsink / cz-gitmoji

Commitizen adapter formatting commit messages using gitmoji(https://gitmoji.carloscuesta.me/).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cz-gitmoji-customize

Commitizen adapter formatting commit messages using emojis.

**This program is a folk of cz-emoji **

cz-gitmoji-customize allows you to easily use emojis in your commits using commitizen.

? Select the type of change you are committing: (Use arrow keys)
❯ feature   Feat: :sparkles:  New features.
  fix       Fix :bug:  Fix a bug.
  docs      Docs: :pencil:  Write docs.
  refactor  Refactor: :art:  Improve structure / format of the code.
  chore     Chore: 🔩  A chore change

Install

Globally

npm install --global cz-gitmoji-customize

# set as default adapter for your projects
echo '{ "path": "cz-gitmoji-customize" }' > ~/.czrc

Locally

npm install --save-dev cz-gitmoji-customize

Add this to your package.json:

"config": {
  "commitizen": {
    "path": "cz-gitmoji-customize"
  }
}

Usage

$ git cz

Customization

By default cz-gitmoji-customize comes ready to run out of the box. Uses may vary, so there are a few configuration options to allow fine tuning for project needs.

How to

Configuring cz-gitmoji-customize can be handled in the users home directory (~/.czrc) for changes to impact all projects or on a per project basis (package.json). Simply add the config property as shown below to the existing object in either of the locations with your settings for override.

{
  "config": {
    "cz-gitmoji-customize": {}
  }
}

Configuration Options

Types

By default cz-gitmoji-customize comes preconfigured with the Gitmoji types.

An Inquirer.js choices array:

{
  "config": {
    "cz-gitmoji-contomize": {
      "types": [
        {
          "emoji": "🌟",
          "code": ":star2:",
          "description": "A new feature",
          "name": "feature"
        }
      ]
    }
  }
}

Scopes

An Inquirer.js choices array:

{
  "config": {
    "cz-gitmoji-customize": {
      "scopes": ["home", "accounts", "ci"]
    }
  }
}

Symbol

A boolean value that allows for an using a unicode value rather than the default of Gitmoji markup in a commit message. The default for symbol is false.

{
  "config": {
    "cz-gitmoji-customize": {
      "symbol": true
    }
  }
}

Skip Questions

An array of questions you want to skip:

{
  "config": {
    "cz-gitmoji-customize": {
      "skipQuestions": ["scope", "issues"]
    }
  }
}

You can skip the following questions: scope, body, and issues. The type and subject questions are mandatory.

Customize Questions

An object that contains overrides of the original questions:

{
  "config": {
    "cz-gitmoji-customize": {
      "questions": {
        "body": "This will be displayed instead of original text"
      }
    }
  }
}

Examples

License

MIT © Nicolas Gryman

About

Commitizen adapter formatting commit messages using gitmoji(https://gitmoji.carloscuesta.me/).

License:MIT License


Languages

Language:JavaScript 100.0%