0.1.1 • Published 5 years ago

quick-commitizen v0.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

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-commitizen

Usage

// All you need to do is
quickcm
// or
quickcm -p yarn

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": {
      "std-cm": 'git-cz',
      "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