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

quick-h5-commitizen

v0.1.9

Published

H5项目提交规范校验工具

Downloads

8

Readme

quick-commitizen

husky问题,基于原作者的修改 https://github.com/we125182/quick-commitizen

This tool is for quick config on commitizen. Setting your repo to use AngularJS's commit message convention also known as conventional-changelog.

// commit msg format:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

current version

Install

npm install -g quick-h5-commitizen

Usage

// All you need to do is
h5git

The above command does:

  1. Installs commitizen cz-conventional-changelog @commitlint/cli husky conventional-changelog-cli module
  2. Saves it to devDependencies
  3. adds belowe keys to the root of your package.json
{
  ...

  "config": {
      "commitizen": {
        "path": "./node_modules/cz-conventional-changelog"
      }
    },
    "husky": {
      "hooks": {
        "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
      }
    },
    "scripts": {
      "cz": 'npm run changelog && git add . && git-cz && git push origin HEAD',
      "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
    }
}
  1. adds the commitlint.config.js to root directory.

Now, you can use npm run std-cm instead git commit. you'll be you'll be prompted to fill in any required fields and your commit messages will be formatted according to the standards defined by project maintainers. details. like:

image

when you release a version, you can run npm run changelog to generate CHANGELOG.md that contains your commit messages.

Related projects

git-cz相关

#指定commit的类型,约定了feat、fix两个主要type,以及docs、style、build、refactor、revert五个特殊type
? **Select the type of change that you're committing:** fix:   A bug fix

#用于描述改动的范围,格式为项目名/模块名
? **What is the scope of this change (e.g. component or file name): (press enter t**
**o skip)** index.html

#对改动进行简短的描述
? **Write a short, imperative tense description of the change (max 83 chars):**
 (11) add a blank

#对改动进行长的描述
? **Provide a longer description of the change: (press enter to skip)**

#是破坏性的改动吗
? **Are there any breaking changes?** No

#影响了哪个issue吗,如果选是,接下来要输入issue号
? **Does this change affect any open issues?** No

git commit msg 规范

注意空格

git commit -m 'feat: add feature'
  • feat: 表示新增了一个功能
  • fix: 表示修复了一个 bug
  • docs: 表示只修改了文档
  • style: 表示修改格式、书写错误、空格等不影响代码逻辑的操作
  • refactor: 表示修改的代码不是新增功能也不是修改 bug,比如代码重构
  • perf: 表示修改了提升性能的代码
  • test: 表示修改了测试代码
  • build: 表示修改了编译配置文件
  • chore: 无 src 或 test 的操作
  • revert: 回滚操作