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-conventional-changelog-befe

v2.3.1

Published

cz adaptor for baidu BEFE

Downloads

48

Readme

cz-conventional-changelog-befe

Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits

cz adaptor for baidu BEFE

cz-conventional-changelog-befe 是为 BEFE 团队定制的 commitizen 适配器.

可以通过友好交互(问答式)提交符合规范的 commit message.

特性

  • 生成 BEFE 团队风格的 commit message
  • 友好问答
  • 支持 icafe / gitlab / github suggest 补全卡片
  • 记录上次的交互输入值
  • 国际化支持(默认使用当前系统语言:中文或英文)

主流规范 vs BEFE 规范

# types is BEFE's standard
<type>(<scope>): <subject>

<body>

<footer>

主要区别

  • types: 是 BEFE 团队定制的 types from conventional-commit-types-befe
  • issues: 提示输入 icafe card ID, 会自动补全前缀
  • 简要描述和关联卡片输入框 支持 icafe suggest
    (如输入 '#{关键字(可以是 id 或者 title 等等)}' 或者 带有明确 icafe spaceId,如 'icafe-api-{关键字}')
  • 支持输入值交互的保存(详见inquirer-store
    使用 git cz --read 来使得上一次保存值生效

生成的 commit message 示例

feat(邮件模块): 富文本输入框添加变量的 mention 功能

mention 功能并未使用第三方库

fix hcm-123,hcm-234,hcm-345

使用

全局使用

npm install -g commitizen
npm install -g cz-conventional-changelog-befe
echo '{ "path": "cz-conventional-changelog-befe" }' > ~/.czrc

当前项目使用

npm install -g commitizen
npm install cz-conventional-changelog-befe

在项目根 package.json 中配置

...
  "config": {
    "commitizen": {
      "path": "cz-conventional-changelog-befe"
    }
  }

在项目中执行 git cz

  • git cz --retry:跳过问答式交互,直接以上一次的提交 message 进行提交
  • git cz --read: 使用 git cz --read 来使得上一次交互输入值成为默认值

文档

在具有卡片提示功能的简要描述字段中,卡片提示补全功能有两种用法:

  1. 补全卡片号:输入 # 开头,tab 键补全卡片号
  2. 补全卡片标题(只在简要描述字段中):输入任意非 # 开头文本,tab 键补全卡片标题

其他的卡片提示字段则只能补全卡片号

Debugger

# 只调试 cz
DEBUG=cz-conventional-changelog-befe git cz

# icafe-api 调试也开启
DEBUG=cz-conventional-changelog-befe,icafe-api* git cz

Examples

git clone https://github.com/be-fe/cz-conventional-changelog-befe.git
cd cz-conventional-changelog-befe

npm i
npm run example
npm run example [type] # type 对应 examples 下的例子,如 github

样例项目

icode commit-demo