Add git:update-hooks to postinstall

This commit is contained in:
Chi-Hsuan Huang 2022-03-30 16:32:38 +08:00
parent 14a2f9a8d8
commit f2dcc1f705
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"preinstall": "npx only-allow pnpm"
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm git:update-hooks",
"git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && husky install"
},
"devDependencies": {
"@automattic/nx-composer": "^0.1.0",