2.0.0 ⢠Published 6 years ago
@axiomzen/cz-adaptor v2.0.0
@axiomzen/cz-adaptor
Commitizen adaptor for consistent commits across codebases. When hooked up to commitizen, you're prompted for some input:
- Select the type of change
- Enter the reference issue
- Write a short commit message
Here's an example of the final formatted commit message:
š doc: adds instructions in readme (#21)
š§ Setup in your project
Initialize commitizen with this adaptor. This will automatically add the required configs to your package.json.
NPM:
npx commitizen init @axiomzen/cz-adaptor --save-dev --save-exact
Yarn:
npx commitizen init @axiomzen/cz-adaptor --yarn --dev --exact
Add
commitizen
andcommitlint
to your project.NPM:
npm install --save-dev commitizen commitlint husky
Yarn:
yarn add --dev commitizen commitlint husky
Add scripts for commits.
... "scripts": { "commit": "git-cz" }
Add husky hook
... "husky": { "hooks": { "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } }
Add
commitlint
config.echo "module.exports = { extends: ['@axiomzen/cz-adaptor/commitlint'] };" > commitlint.config.js
š·āāļø Configuration
The adaptor supports a few configs that can be added to your project's package.json
:
...
"config": {
"commitizen": {
- "path": "./node_modules/@axiomzen/cz-adaptor"
+ "path": "./node_modules/@axiomzen/cz-adaptor",
+ "@axiomzen/cz-adaptor": {
+ "issuePrompt": false
+ }
}
}
...
Supported options:
- issuePrompt
- default:
true
- Toggles whether cz should ask for an issue number.
- default:
- repos
- default:
[]
- Provide an array of repos that will be given to the user to choose from. By default, only the current repo is shown, though users may enter their own.
- For proper linking on GitHub, repos should include the owner:
["axiomzen/cz-adaptor"]
- If no repos are provided, the repo prompt is not shown.
- default:
2.0.0
6 years ago
1.3.7
6 years ago
1.3.6
6 years ago
1.3.5
6 years ago
1.3.4
6 years ago
1.3.3
6 years ago
1.3.2
6 years ago
1.3.1
6 years ago
1.3.0
6 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.0
7 years ago
0.1.9
7 years ago
0.1.8
7 years ago
0.1.7
7 years ago
0.1.5
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago