前端工程化:githook工具-husky
1.npm install husky
2.pakage.json配置
{
"husky": {
"hooks": {
"pre-commit": "npm run test", // 在commit之前先执行npm run test命令
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS" // 校验commit时添加的备注信息是否符合我们要求的规范
}
}
}
3.git commit -m 的时候,按照格
原创
2021-11-02 11:19:14 ·
384 阅读 ·
0 评论