Skip to content

🧪 A repo built for trying workflows using husky and commitzen.

License

Notifications You must be signed in to change notification settings

JASONPANGGO/git-husky-commitizen-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

husky commitizen lab

🧪 A repo built for trying workflows using husky and commitizen

Usage

yarn

After any kinds of modify

git add .

Now you should use

git-cz

to commit your changes.

If your commit messages can't pass the commitlint, you can't continue your commitment.

Working with sourcetree (or other GUI git tool)

GUI tool may prompt yarn: command is not found please save this to ~

.huskyrc

# .huskyrc
export PATH="/usr/local/bin/:$PATH"

How this work?

1. 🦾 Install commitlint

yarn add --dev @commitlint/cli @commitlint/config-angular cz-conventional-changelog

2. 📃 Add commitlint.config.js

module.exports = {
    extends: ['@commitlint/config-angular']
};

3. 🐶 Install husky

yarn add --dev husky
yarn husky init

4. ⚡️ package.json

"scripts": {
    "commit": "git-cz",
    "prepare": "husky install",
    "test": "commitlint --edit $1"
  },

5. ⚙️ husky config

.husky/commit-msg

yarn test

About

🧪 A repo built for trying workflows using husky and commitzen.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published