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

git-cm

v1.1.2

Published

a simple version of the git commit

Downloads

13

Readme

A lightweight, independent, 0 configurations git commit message tool

✨ Allow one-time input of the commit message and then verify it to ensure compliance with AngularJS's commit message convention.

✨ Allow customization of your commit information through inquiry

✨ Allow adding configuration files in the project and customizing your git commit message,or using default configurations.

git-cm-verify-demo

git-cm-select-demo

Installing the command line tool

Installation is as simple as running the following command (if you see EACCES error, reading fixing npm permissions may help):

npm install -g git-cm

Using the command line tool

Simply use git-cm or cm instead of git commit when committing.

Supported command line options

git-cm
git-cm -a
git-cm -m 'type(scope): subject'
git-cm -am 'type(scope): subject'

or as an npm script:

  ...
  "scripts": {
    "commit": "git-cm"
  }

when you use git-cm, without a committing message, you'll be prompted to fill out any required commit fields at commit time with a format of the default configuration file.

you can see the format of the default configuration file in gitcommitrc.json

Of course, you can also create gitcommitrc.json file below in the root directory of your project, to overwriting the default file.

when you use git-cm, with a committing message, such as git-cm -m 'type(scope): subject', the message will be verified, whether to use AngularJS's commit message convention.


Recommended Commit Message Format

<type>(<scope>): <short summary>
  │       │             │
  │       │             └─⫸ Summary in present tense. Not capitalized. No period at the end.
  │       │
  │       └─⫸ Commit Scope: Optional, can be anything specifying the scope of the commit change.
  |                          In App Development, scope can be a page, a module or a component.
  │
  └─⫸ Commit Type: feat|fix|docs|style|refactor|test|chore|perf|ci|build|chore

The <type> and <summary> fields are mandatory, the (<scope>) field is optional.

❌ Bad:

update README to add how to install

✅ Good:

docs: update README to add how to install

✅ Good (commit message with scope):

docs(README): update README to add how to install

The default commit types can be extended or modified by gitcommitrc.json.

Zero Configurations

Configurations Not Required! If it has to be customized we have the guide below.

The default types includes feat, fix, docs, style, refactor, test, chore, perf, ci, build and chore.

The default max-len is 100 which means the commit message cannot be longer than 100 characters. All the settings can be modified in gitcommitrc.json.

gitcommitrc.json

Except for default types, you can add, overwrite.

For example if you have this gitcommitrc.json file below in the root directory of your project:

you can see the format of the example configuration file in gitcommitrc-example.json

{
  "types": [
    {
      "value": "feat",
      "name": "A new feature "
    },
    {
      "value": "fix",
      "name": "A bug fix "
    },
    {
      "value": "docs",
      "name": "Documentation only changes "
    },
    {
      "value": "style",
      "name": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) "
    },
    {
      "value": "refactor",
      "name": "A code change that neither fixes a bug nor adds a feature "
    },
    {
      "value": "perf",
      "name": "A code change that improves performance"
    },
    {
      "value": "test",
      "name": "Adding missing tests or correcting existing tests"
    },
    {
      "value": "ci",
      "name": "Changes to your CI configuration files and scripts"
    },
    {
      "value": "build",
      "name": "Changes that affect the build system or external dependencies"
    },
    {
      "value": "chore",
      "name": "Changes to the build process or auxiliary tools and libraries such as documentation generation."
    }
  ],
  "messages": {
    "type": "(type) Select the type of change that you're committing: (Use arrow keys)",
    "scope": "(scope) Write a brief description of the scope of impact:",
    "subject": "(subject) Write a short, imperative tense description of the change:",
    "body": "(body) Provide a longer description of change, Wrap with :\n",
    "footer": "(footer) List any breaking changes:"
  },
  "maxLen": 100,
  "minLen": 0,
  "subjectLimit": 50,
  "skipQuestions": ["body", "footer"],
  "scopeRequired": false,
  "lang": "en-US"
}

Features

  1. Visualization, low cost to Learn.
  2. Independent, zero configurations.
  3. Support for local configuration files and customizing your git commit message.
  4. Prompt error msg precisely, friendly to commit message format unfamiliar developers.
  5. i18n: en-US, zh-CN supported.
  6. The linter is customizable for your team by configuring local files.