0.6.2 ā€¢ Published 4 years ago

@lxxyx/emoji-cz v0.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

emoji-cz

A commitizen emoji adapter.

NPM

? Select the type of change that you're committing: (Use arrow keys)
āÆ āœØ  Feat:      A new feature
  šŸ›  Fix:       A bug fix
  šŸ“š  Docs:      Documentation only changes
  šŸŽØ  Style:     Changes that do not affect the meaning of the code
  šŸ”Ø  Refactor:  A code change that neither fixes a bug nor adds a feature
  šŸš€  Perf:      A code change that improves performance
  šŸšØ  Test:      Adding missing tests or correcting existing tests

Demo

Just check out the commit history above :point_up:

Installation

yarn global add emoji-cz
# OR
# npm install --global emoji-cz

# set as default adapter globally
echo '{ "path": "emoji-cz" }' > ~/.czrc

Usage

Simply use git cz instead of git commit when committing. See the doc of Commitizen for more info.

Settings

You can overwrite the settings in 3 different ways, it will apply the config by this order:

  1. package.json
  2. .cz.json
  3. .czrc
// in package.json
"config": {
  "commitizen": {
    // ...
    "emoji-cz": {
      // Overwrite types prompted to the command line.
      "types": {
        "Fix": {
          "emoji": "šŸ", // overwrite "Fix" emoji to a bee
          "name": "Bug", // overwrite "Fix" name to "Bug"
          "description": "Dirty bug" // overwrite description of "Fix"
        },
        // add a new type "Chore"
        "Chore": {
          "emoji": "ā“",
          "description": "Other changes that don't modify src or test files"
        }
      },

      // Overwrite the output commit subject in the specified format.
      // Below is the default format,
      // [emoji] will be replace with the chose type's emoji,
      // [name] will be replace with the chose type's name,
      // [subject] will be replace with the subject you entered.
      // One example output of the format can be: `āœØ Feat: initial commit`
      "format": "[emoji] [name]: [subject]"
    }
  }
}

// in .cz.json or .czrc
{
  "emoji-cz": {
    //...
  }
}

Author

Kai Hao kevin830726@gmail.com

License

MIT