@ms918/mrm-task-cz
v0.5.2
Published
mrm task创建cz配置
Downloads
7
Maintainers
Readme
@ms918/mrm-task-cz
mrm task,用来创建
commitlint
和commitizen
配置
创建或更新package.json
,如下
{
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"commitizen": "^4.2.2",
"cz-conventional-changelog": "^3.3.0",
"husky": "^4.3.0"
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"scripts": {
"cz": "cz"
}
}
创建的commitlint.config.js
如下
module.exports = { extends: ['@commitlint/config-conventional'] }
用法
npm install -g @ms918/mrm-task-cz
mrm @ms918/mrm-task-cz
当执行的时候,会走下面步骤:
- 执行
@ms918/mrm-task-husky
操作 - 配置
commilint
- 使用
yarn
ornpm
安装@commitlint/config-conventional
、@commitlint/cli
- 创建或覆盖
commitlint.config.js
文件 - 设置
package.json
的husky.hooks.commit-msg
字段为commitlint -E HUSKY_GIT_PARAMS
- 使用
- 配置
commitizen
- 使用
yarn
ornpm
安装commitizen
、cz-conventional-changelog
- 设置
package.json
的config.commitizen.path
为cz-conventional-changelog
- 设置
cz
script
- 使用