• Stars
    star
    356
  • Rank 119,446 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Commitizen adapter formatting commit messages using emojis.

cz-emoji

Commitizen adapter formatting commit messages using emojis.

cz-emoji 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 change
  refactor  🎨  A code refactoring change
  chore     πŸ”©  A chore change

Install

Globally

npm install --global cz-emoji

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

Locally

npm install --save-dev cz-emoji

Add this to your package.json:

"config": {
  "commitizen": {
    "path": "cz-emoji"
  }
}

Usage

$ git cz

Customization

By default cz-emoji 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-emoji 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-emoji": {}
  }
}

Configuration Options

Types

By default cz-emoji comes preconfigured with the Gitmoji types.

An Inquirer.js choices array:

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

Scopes

An Inquirer.js choices array:

{
  "config": {
    "cz-emoji": {
      "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-emoji": {
      "symbol": true
    }
  }
}

Skip Questions

An array of questions you want to skip:

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

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

Customize Questions

An object that contains overrides of the original questions:

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

Customize the subject max length

The maximum length you want your subject has

{
  "config": {
    "cz-emoji": {
      "subjectMaxLength": 200,
    }
  }
}

Examples

Commitlint

Commitlint can be set to work with this package by leveraging the package https://github.com/arvinxx/commitlint-config-gitmoji.

npm install --save-dev commitlint-config-gitmoji

commitlint.config.js

module.exports = {
  extends: ['gitmoji'],
  parserPreset: {
    parserOpts: {
      headerPattern: /^(:\w*:)(?:\s)(?:\((.*?)\))?\s((?:.*(?=\())|.*)(?:\(#(\d*)\))?/,
      headerCorrespondence: ['type', 'scope', 'subject', 'ticket']
    }
  }
}

Other projects

  • Fauda: configuration made simple.
  • Commitizen Emoji: Commitizen adapter formatting commit messages using emojis.
  • Reading Time: Medium's like reading time estimation.

License

MIT Β© Nicolas Gryman

More Repositories

1

reading-time

πŸ“š Medium's like reading time estimation.
TypeScript
1,369
star
2

jquery.finger

✌️ jQuery touch & gestures, fingers in the nose.
JavaScript
426
star
3

badge-size

🍻 Displays the size of a given file in your repository.
JavaScript
298
star
4

gulp-bro

πŸ‘Š gulp + browserify + incremental build, done right.
JavaScript
121
star
5

social-redirects

🐳 Redirect glyph urls to your social networks profiles.
PHP
86
star
6

tree-crawl

πŸƒ Agnostic tree traversal library.
JavaScript
84
star
7

raf.js

πŸƒ Request Animation Frame polyfill
JavaScript
45
star
8

lol-champions

Simplified, up-to-date, League of Legends champions list.
JavaScript
45
star
9

ribs

πŸ– Responsive Images Baked Server-side.
JavaScript
39
star
10

fauda

Configuration made simple.
TypeScript
33
star
11

contributor-faces

Put your contributors faces in your readme.
JavaScript
31
star
12

virtual-pointer

Simulates a pointer with jQuery in PhantomJS and the browser.
JavaScript
25
star
13

codesandbox-theme

Codesandbox theme for VSCode.
22
star
14

obelisk-buildr

Isometric builder using obelisk.js.
JavaScript
21
star
15

compass

Compass wrapper and middleware for node.js.
JavaScript
16
star
16

lol-items

Simplified, up-to-date, League of Legends items list.
JavaScript
8
star
17

awesome-stars

A curated list of my GitHub stars!
7
star
18

tree-morph

πŸƒ Agnostic tree morphing library.
JavaScript
6
star
19

qs-numbers

A qs plugin that enables number parsing.
JavaScript
6
star
20

sass-dry

DRY your SASS code.
CSS
6
star
21

grunt-glue-js

Grunt task to build CommonJS modules for the browser using gluejs.
JavaScript
5
star
22

tree-mutate

πŸƒ n-ary tree mutation library.
JavaScript
4
star
23

lol-spells

Simplified, up-to-date, League of Legends summoner spells list.
JavaScript
4
star
24

v8-windows-tickprocessor

Drop-in v8 windows tick processor for profiling
4
star
25

readme-filename

Get a project readme file name.
JavaScript
3
star
26

mincmp

🍷 Compare npm package source files minimaps
JavaScript
3
star
27

woot-bar

Very minimalist tmux status bar that displays used memory and CPU usage.
Rust
3
star
28

experiment-car-drawing

Car Drawing Experiment
JavaScript
3
star
29

simulator

Mouse and touch events simulator
JavaScript
3
star
30

object-defaults

Like _.defaults, assigns properties of source objects to a target, without overriding existing ones.
JavaScript
2
star
31

hi5

Friendly lightweight type checker πŸ™Œ.
JavaScript
2
star
32

meta-dev

πŸ“¦ Meta package for devDependencies.
JavaScript
2
star
33

vinyl-adapter-picker

Protocol based vinyl adapter picker.
JavaScript
2
star
34

ds-linked-list

A simply linked list data structure in JavaScript.
JavaScript
2
star
35

optify

Generates a combination matrix from a set key/value pairs.
JavaScript
2
star
36

p-using

Dispose a resource when p-using promise resolves.
JavaScript
1
star
37

gulp-pimp

Pimp your imports!
JavaScript
1
star
38

ngryman.github.io

Script that executes me.
HTML
1
star
39

ViZion

OS for multimedia box in HTML and running on Node.JS
JavaScript
1
star
40

bookmarks-baby

Bookmarks Baby!
JavaScript
1
star
41

leap-impress

Control your Impress.js presentations with gestures using Leap Motion.
JavaScript
1
star
42

compare-values

Get functions to compare two values given an operator.
JavaScript
1
star
43

love-hate-particles

This is a little experiment about two particles' relationship.
CoffeeScript
1
star
44

thread-sass-loaders-bug

JavaScript
1
star
45

live-templates

A collection of handy live templates I use with IntelliJ / WebStorm.
1
star
46

npm-v

Get installed npm version
JavaScript
1
star
47

gulp-say

Text To Speech errors for gulp.
JavaScript
1
star
48

webstorm-libraries

Set of JavaScript for WebStorm and IntelliJ.
JavaScript
1
star
49

to-method

βš“ Convert c-like functions to class methods.
JavaScript
1
star
50

graceful-fs-stream

Graceful filesystem streams.
JavaScript
1
star
51

loop.js

HTML5 game ecosystem
JavaScript
1
star
52

traps

🐺 Capture me if you can!
JavaScript
1
star
53

lines-iterator

Iterates over lines, es6 way.
JavaScript
1
star
54

asmr

Show a list of your repos. That's it!
JavaScript
1
star
55

wombat-js

Javascript Game Engine
JavaScript
1
star
56

letenv

CLI environment variables loader.
JavaScript
1
star
57

unchain

Synchronous function chaining with delay support.
JavaScript
1
star
58

stores

Stores things efficiently. Don't worry about cache stampede anymore.
JavaScript
1
star
59

generator-library

Scaffold a generic node library.
JavaScript
1
star
60

compare-properties

Get functions to compare two object properties given an operator.
JavaScript
1
star