0.0.3 โข Published 5 months ago
gitmoji-autotag v0.0.3
gitmoji-autotag
Script for adding emoji before the commit message based on conventional commit types.
Installation
npm i -D gitmoji-autotag
# or
yarn add -D gitmoji-autotag
Usage
- Install
husky
- Create a
commit-msg
in.husky
- Added script
npx gitmoji-autotag $1
- Write your commit message:
When you write your commit message, use the conventional commit types (e.g., feat, fix, chore, etc.) followed by a colon and the message. For example:
feat: add new feature => ๐ feat: add new feature fix: resolve bug => ๐ fix: resolve bug chore: update dependencies => ๐ง chore: update dependencies
Configuration
You can customize the emoji configuration by creating a configuration file in your project root. The configuration file can be named gitmoji-autotag.json
, .gitmoji-autotagr.json
, .gitmoji-autotagr.js
, .gitmoji-autotagr.cjs
, .gitmoji-autotagr.mjs
, or gitmoji-autotag.config.js
.
Example configuration file (gitmoji-autotag.config.js):
module.exports = {
feat: "๐",
fix: "๐",
chore: "๐ง",
docs: "๐",
style: "๐จ",
refactor: "โป๏ธ",
test: "๐งช",
perf: "โก",
ci: "๐ค",
build: "๐",
revert: "๐",
// You can add custom fields
custom: "๐"
};