Skip to content

Commit 2b854fc

Browse files
mathonsundayclaude
andcommitted
Add husky git hooks and release automation scripts
- Pre-commit hook: Automatically builds on commits - Post-merge hook: Auto-installs dependencies if package-lock.json changed - Release scripts: npm run release:patch/minor/major for one-command releases with version bump and publishing Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 3210c24 commit 2b854fc

4 files changed

Lines changed: 711 additions & 7 deletions

File tree

.husky/post-merge

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
if git diff --name-only HEAD@{1} HEAD | grep -q "^package-lock.json$"; then
5+
npm install
6+
fi

.husky/pre-commit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
33

4-
npx lint-staged
4+
npm run build

0 commit comments

Comments
 (0)