mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-29 06:32:28 +00:00
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:
parent
de81a42873
commit
55488fdfcd
2 changed files with 1 additions and 17 deletions
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue