cz-emoji-darkdev
v1.2.4
Published
Commitizen adapter formatting commit messages using emojis.
Downloads
13
Readme
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
, and issues
. 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"
}
}
}
}
Examples
- https://github.com/Falieson/TRAM
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']
}
}
}
License
MIT © Nicolas Gryman
/*
{ emoji: "🔊", code: ":loud_sound:", description: "Adding logs.", name: "log-add" }, { emoji: "🔇", code: ":mute:", description: "Removing logs.", name: "log-rm" }, { emoji: "📝", code: ":pencil:", description: "Writing docs.", name: "docs" }, { emoji: "💬", code: ":speech_balloon:", description: "Updating text and literals.", name: "texts" }, emoji: "📸", code: ":camera_flash:", description: "Adding or updating snapshots", name: "camera-flash" },
// chrome, firefox, safari, mobile ios, mobile anroid. { emoji: "🍎", code: ":apple:", description: "Fixing something on macOS.", name: "osx" }, { emoji: "🐧", code: ":penguin:", description: "Fixing something on Linux.", name: "linux" }, { emoji: "🏁", code: ":checkered_flag:", description: "Fixing something on Windows.", name: "windows" }, { emoji: "🤖", code: ":robot:", description: "Fixing something on Android.", name: "android" }, { emoji: "🍏", code: ":green_apple:", description: "Fixing something on iOS.", name: "ios" }, { emoji: "🚨", code: ":rotating_light:", description: "Removing linter warnings.", name: "lint" }, { emoji: "💚", code: ":green_heart:", description: "Fixing CI Build.", name: "fix-ci" },
// issue { emoji: "🔒", code: ":lock:", description: "Fixing security issues.", name: "security" },
{
emoji: "🤡",
code: ":clown_face:",
description: "Mocking things.",
name: "clown-face"
},
{
emoji: "🥚",
code: ":egg:",
description: "Adding an easter egg.",
name: "egg"
},
{
emoji: "🚀",
code: ":rocket:",
description: "Deploying stuff.",
name: "deploy"
},
{
emoji: "✏️",
code: ":pencil2:",
description: " Fixing typos.",
name: "typo"
},
{
emoji: "🐳",
code: ":whale:",
description: "Work about Docker.",
name: "docker"
},
{
emoji: "♿️",
code: ":wheelchair:",
description: "Improving accessibility.",
name: "access"
},
{
emoji: "🍻",
code: ":beers:",
description: "Writing code drunkenly.",
name: "beer"
},
{
{
emoji: "🙈",
code: ":see_no_evil:",
description: "Adding or updating a .gitignore file",
name: "see-no-evil"
},
{
emoji: "⚗",
code: ":alembic:",
description: " Experimenting new things",
name: "experiment"
},
{
emoji: "☸️",
code: ":wheel_of_dharma:",
description: " Work about Kubernetes",
name: "k8s"
},
{
emoji: "🏷️",
code: ":label:",
description: " Adding or updating types (Flow, TypeScript)",
name: "types"
},
{
emoji: "🌱",
code: ":seedling:",
description: "Adding or updating seed files",
name: "seed"
},
{
emoji: "🚩",
code: ":triangular_flag_on_post:",
description: "Adding, updating, or removing feature flags",
name: "flags"
},
{
emoji: "💫",
code: ":dizzy:",
description: "Adding or updating animations and transitions",
name: "animation"
}
{
emoji: "👥",
code: ":busts_in_silhouette:",
description: "Adding contributor(s).",
name: "contrib-add"
},
{
emoji: "🚸",
code: ":children_crossing:",
description: "Improving user experience / usability.",
name: "ux"
},
// REMAINS repository
{
emoji: "⏪",
code: ":rewind:",
description: "Reverting changes.",
name: "revert"
},
{
emoji: "🔖",
code: ":bookmark:",
description: "Releasing / Version tags.",
name: "release"
},
// сомнительные управление зависимостями
{
emoji: "⬇️",
code: ":arrow_down:",
description: " Downgrading dependencies.",
name: "downgrade"
},
{
emoji: "⬆️",
code: ":arrow_up:",
description: " Upgrading dependencies.",
name: "upgrade"
},
{
emoji: "📌",
code: ":pushpin:",
description: "Pinning dependencies to specific versions.",
name: "pushpin"
},
// сомнительное для иннициализации репозитория
{
emoji: "👷",
code: ":construction_worker:",
description: "Adding CI build system.",
name: "ci"
},
{
emoji: "🎉",
code: ":tada:",
description: "Initial commit.",
name: "init"
},
{
emoji: "✅",
code: ":white_check_mark:",
description: "Adding tests.",
name: "test"
},
{
emoji: "📄",
code: ":page_facing_up:",
description: "Adding or updating license.",
name: "license"
},
{
emoji: "🍱",
code: ":bento:",
description: "Adding or updating assets.",
name: "assets"
},
*/