0.1.0 • Published 8 years ago
npm-scripts-conventional-changelog v0.1.0
npm-scripts-conventional-changelog
Configuration for npm-scripts-config where conventional-changelog, commitlint and commitizen are ready to use.
This configuration expose three commands:
- commit: trigger commitizen to guide the developer to write a standardized commit message
- commitmsg: used by husky to lint commit message when git commit is run
- version: generates a changelog and it to the commit
- preview-changelog: adds unreleased commits to changelog to preview the output (warning: do not commit this generated changelog)
commitizen, commitlint and conventional-changelog are configured to follow angular conventions.
Installation
npm install --save-dev npm-scripts-config npm-scripts-conventional-changelogCreate a new file that will load the configuration from this package.
.scriptsrc
{
"@extends": "npm-scripts-conventional-changelog"
}In your project you still need to specify which rules you want to use for commitlint and commitizen, but packages will already be installed. To specify those rules you need to create update the package.json and create a commitlint.config.js files:
package.json
{
[...]
"scripts": {
"commit": "npm-scripts-config commit",
"commitmsg": "npm-scripts-config commitmsg",
"version": "npm-scripts-config version",
"preview-changelog": "npm-scripts-config preview-changelog"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
[...]
}commitlint.config.js
module.exports = {
extends: ["@commitlint/config-conventional"]
}