chore: simplify prepare script, remove scripts/prepare.cjs

.husky/pre-commit is committed to the repo — developers get the hook
by cloning, not by running npm install. prepare only needs to build
TypeScript for npm publish/pack.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jreakin 2026-03-23 04:18:02 -05:00
parent de81a42873
commit 55488fdfcd
2 changed files with 1 additions and 17 deletions

View file

@ -45,7 +45,7 @@
"test:integration": "vitest run test/integration",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"prepare": "node scripts/prepare.cjs",
"prepare": "npm run build",
"postinstall": "node scripts/patch-tree-sitter-swift.cjs",
"prepack": "npm run build && chmod +x dist/cli/index.js"
},

View file

@ -1,16 +0,0 @@
/**
* Prepare script: build TypeScript and install husky hooks.
* Uses Node child_process so it works on Windows (cmd.exe) and POSIX.
*/
const { execSync } = require('child_process');
const path = require('path');
// 1. Build
execSync('npm run build', { stdio: 'inherit', cwd: __dirname + '/..' });
// 2. Install husky (from repo root — one level up from gitnexus/)
try {
execSync('npx husky', { stdio: 'inherit', cwd: path.resolve(__dirname, '../..') });
} catch {
// Husky install is optional — may fail in CI or tarball installs
}