File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ . " $( dirname -- " $0 " ) /_/husky.sh"
3+
4+ # Run the custom pre-commit script
5+ ./.githooks/pre-commit
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ . " $( dirname -- " $0 " ) /_/husky.sh"
3+
4+ # Run the custom pre-push script
5+ ./.githooks/pre-push
Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ setup-git-hooks:
55 chmod +x .git/hooks/pre-commit && chmod +x .git/hooks/pre-push && chmod +x .git/hooks/prepare-commit-msg && chmod +x .git/hooks/commit-msg
66 @echo " SUCCESS: Git hooks installed!"
77
8+ # Setup Husky hooks (called automatically by npm install)
9+ setup-husky-hooks :
10+ @echo " SETUP: Setting up Husky integration..."
11+ @mkdir -p .husky
12+ @echo ' #!/usr/bin/env sh\n. "$$(dirname -- "$$0")/_/husky.sh"\n\n# Run the custom pre-commit script\n./.githooks/pre-commit' > .husky/pre-commit
13+ @echo ' #!/usr/bin/env sh\n. "$$(dirname -- "$$0")/_/husky.sh"\n\n# Run the custom pre-push script\n./.githooks/pre-push' > .husky/pre-push
14+ @chmod +x .husky/pre-commit .husky/pre-push
15+ @echo " SUCCESS: Husky hooks configured!"
16+
817# Install Node.js dependencies for commit tools
918install-commit-tools :
1019 @echo " SETUP: Installing commit tools..."
@@ -22,7 +31,7 @@ validate-commit:
2231 npm run lint:commit
2332
2433# Setup complete development environment
25- setup-dev : install-commit-tools setup-git -hooks
34+ setup-dev : install-commit-tools setup-husky -hooks
2635 @echo " SUCCESS: Development environment setup complete!"
2736 @echo " "
2837 @echo " 🎉 You're all set! Use the following commands:"
You can’t perform that action at this time.
0 commit comments