CONFIGURED - Auto-activate git hooks via npm prepare script

Add a prepare script that runs 'git config core.hooksPath .githooks' on every
npm install, so the commit-msg style gate and pre-push test gate turn on
automatically per clone with nothing to remember. Guarded with '|| true' so
installs never fail where git is absent (e.g. tarball deploys). Document that
the deploy server never needs it since it only pulls.
This commit is contained in:
moh
2026-09-20 18:54:55 +02:00
parent 213c45476c
commit f627118b2c
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"prepare": "git config core.hooksPath .githooks || true",
"dev": "next dev -p 3014",
"build": "next build --webpack",
"start": "next start",