Skip to content

we125182/quick-commitizen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

cli for quick config commitizen and changelog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published