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

g-cz-emoji

v1.0.2

Published

中文版本符合 Angular commit 规范的 git-cz emoji 提示

Downloads

8

Readme

g-cz-emoji

中文版本符合 Angular commit 规范的 git-cz emoji 提示

g-cz-emoji allows you to easily use emojis in your commits using commitizen.

? 选择提交的更改类型:
❯ feat      🌟  引入新特性
  fix       🐞  修复 Bug
  docs      📚  写文档
  refactor  🎨  重构代码
  chore     🔩  杂事修改

安装

全局

npm install --global commitizen g-cz-emoji

# 推荐配置
echo '{ "path": "g-cz-emoji", "config": { "g-cz-emoji": { "skipQuestions": [ "issues", "body" ] } } }' > ~/.czrc

# 设置为项目的默认适配器
echo '{ "path": "g-cz-emoji" }' > ~/.czrc

本地

npm install --save-dev g-cz-emoji

添加到本地项目的 package.json:

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

使用

$ git cz

Customization

默认情况下,g-cz-emoji 已经可用。对于不同用户使用方法可能有所不同,因此有一些配置选项可以根据项目需要进行微调。 作者在项目中的配置如下:

如何使用

配置 g-cz-emoji 可以在用户主目录 (~/.czrc) 中处理,影响所有项目的变更。或者对于每个项目的单独配置可以在(package.json)处理。只需将如下所示的配置属性添加到具有重写设置的任意位置的现有对象中。

{
  "config": {
    "g-cz-emoji": {}
  }
}

配置选项

Types

默认情况下 g-cz-emoji 配置了符合 Angular 规范的并且在 Gitmoji 中的 commit 类型。

An Inquirer.js 你可以自定义类型数组:

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

Scopes

An Inquirer.js choices array:

{
  "config": {
    "g-cz-emoji": {
      "scopes": ["home", "accounts", "ci"]
    }
  }
}

Symbol

一个布尔值,允许在提交消息中使用 unicode 值而不是默认的 Gitmoji标记。Symbol 的默认值为 true。

{
  "config": {
    "g-cz-emoji": {
      "symbol": false
    }
  }
}

conventional

一个布尔值,是否保持传统提交类型,允许在提交消息中保持 type 的同时直接将 Gitmoji 中的 emoji 内容到 message 中。 conventional 的默认值为 true。

{
  "config": {
    "g-cz-emoji": {
      "conventional": true
    }
  }
}

例子:

# true
fix: 🐛  fix a bug
# false
🐛   fix a bug

Skip Questions

你想要跳过的一系列问题:

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

你可以跳过以下问题: scope, body, issues, 和 breakingtypesubject 是必填项。

Customize Questions

包含原始问题覆盖的对象:

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

Customize the subject max/min length

你想要的主题的最大长度/最小长度:

{
  "config": {
    "g-cz-emoji": {
      "subjectMaxLength": 200,
      "subjectMinLength": 5,
    }
  }
}

Commitlint

Commitlint 可以使用这个包来进行设置 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 © guowenfh