Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 2.15 KB

README.md

File metadata and controls

69 lines (52 loc) · 2.15 KB

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