npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@humankode/git-commit-emojify

v0.0.17

Published

A script for the prepare-commit-msg git hook that automatically emojifies git messages

Downloads

6

Readme

git-commit-emojify Build status @humankode/git-commit-emojify on npm

A prepare-commit-msg git hook script to automatically add emojis to git commit messages

For example, git commit -m "hotfix to fix caching"

//=> 🚑 hotfix to fix caching

or

in branch feature-implement-caching

git commit -m "implemented caching" (uses branch name to determine which emoji to use if not enough context in the commit message)

//=> ✨ implemented caching

Usage

Install and configure Husky

.husky/prepare-commit-msg

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --yes @humankode/git-commit-emojify@latest

Zero config by default

Zero configuration by default.

If no configuration specified, it will

  • map a commit message to an emoji using emojiKeywordMap.ts
  • if unable to map a message to an emoji, it will attempt to map the branch name to an emoji using branchTypes.ts

Configuration

To override the default configuration, place a file called gitEmojify.json in your root directory.

Refer to the Configuration interface for all options.

Example configurations

1. Override branch type configuration

gitEmojify.json

{
  "branchTypes": {
    "build": {
      "emoji": "👷"
    },
    "bugfix": {
      "emoji": "🐛"
    }
  }
}

For example

branch: build-updates

git commit message: git commit -m "ci updates"

//=> 👷 ci updates

2. Suffix the emoji

gitEmojify.json

{
  "prefixEmoji": false
}

This will place the emoji at the end of the commit message.

For example

branch: build-updates

git commit message: git commit -m "ci updates"

//=> ci updates 👷

3. Override emoji keywords

gitEmojify.json

{
  "emojiKeywords": [
    {
      "keywords": ['bug'],
      "emoji": "🪲",
    },
    {
      keywords: ["revert"],
      emoji: "⏪️",
    }
  ]
}

For example

branch: build-updates

git commit message: git commit -m "bugfix"

//=> 🪲 bugfix

4. Complete configuration example

gitEmojify.json

{
  "prefixEmoji": true,
  "branchTypes": {
    "build": {
      "emoji": "👷"
    },
    "bugfix": {
      "emoji": "🐛"
    }
  },
  "emojiKeywords": [
    {
      "keywords": ['bug'],
      "emoji": "🪲",
    },
    {
      keywords: ["revert"],
      emoji: "⏪️",
    }
  ]
}

This will override the configuration for emojiKeywords and will match the keywords bug and revert to commit messages.

Maintainers