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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user