diff --git a/actions/set-project.js b/actions/set-project.js index 0acbb5c..70725f9 100644 --- a/actions/set-project.js +++ b/actions/set-project.js @@ -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' });