Skip to content

Commit

Permalink
fix(set-project): 切换 husky set 命令防止重复添加
Browse files Browse the repository at this point in the history
  • Loading branch information
StreakingMan committed Mar 25, 2022
1 parent 9c72c1e commit b705f39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actions/set-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ const setProject = async () => {
// husky安装与钩子配置
execSync('npx husky install');
execSync('npm set-script prepare "husky install"');
execSync('npx husky add .husky/pre-commit "npx lint-staged"');
execSync('npx husky set .husky/pre-commit "npx lint-staged"');
execSync(
'npx husky add .husky/commit-msg "npx --no-install commitlint --edit $1"'
'npx husky set .husky/commit-msg "npx --no-install commitlint --edit $1"'
);
fileGenerator({ templateName: 'commitlint' });
fileGenerator({ templateName: 'lintstaged' });
Expand Down

0 comments on commit b705f39

Please sign in to comment.