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

cz-emoji-chinese

v0.3.1

Published

中文版本的 git-cz emoji 提示

Downloads

533

Readme

cz-emoji-chinese

中文版本的 git 提交 emoji 提示

cz-emoji-chinese allows you to easily use emojis in your commits using [commitizen] with chinese.

❯ git cz
? 选择提交的更改类型: (Use arrow keys or type to search)
❯ fix      🐛  修复 Bug
  style    🎨  改进代码的结构/格式
  feature  ✨  引入新特性
  prune    🔥  移除代码/文件
  ui       💄  更新UI和样式文件
  docs     📝  写文档
  init     🎉  初始化提交

Install

Globally

sudo npm install commitizen cz-emoji-chinese -g

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

# Method 2: If you want minimalist mode, you can set it like this
echo '{ "path": "cz-emoji-chinese", "config": { "cz-emoji-chinese": { "skipQuestions": [ "issues", "scope","body" ],"subjectMinLength": 6 } } }' > ~/.czrc

Locally

npm install --save-dev commitizen cz-emoji-chinese

Add this to your package.json:

"config": {
  "commitizen": {
     "path": "./node_modules/cz-emoji-chinese"
  },
}

Usage

$ git cz

Customization

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

Configuration Options

Skip Questions

An array of questions you want to skip:

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

.czrc like this:

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

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

Types

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

An [Inquirer.js] choices array:

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

Scopes

An [Inquirer.js] choices array:

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

Customize Questions

An object that contains overrides of the original questions:

{
  "config": {
    "cz-emoji-chinese": {
      "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 © Tw93

Changelog

0.3.1

  • [+] add subjectMinLength for Config