Eve/setup-hooks.ts
Danny Morabito 18e4ad7629
📚 Enhance project setup & maintenance workflows
- 📝 Add comprehensive README.md, CONTRIBUTING.md, and 🔒 SECURITY.md documentation
- 🔧 Integrate code formatting tool and refactor existing codebase to meet style guidelines
- ⬆️ Update project dependencies to latest stable versions
- 🤖 Implement pre-commit hook for automated code formatting

#documentation #tooling #maintenance
2025-03-10 17:14:09 +01:00

18 lines
453 B
TypeScript
Executable file

#!/usr/bin/env bun
import { spawnSync } from "child_process";
import { resolve } from "path";
const hooksPath = resolve(".hooks");
console.log(`Setting git hooks path to ${hooksPath}...`);
const result = spawnSync("git", ["config", "core.hooksPath", hooksPath], {
stdio: "inherit",
});
if (result.status === 0) {
console.log("Git hooks successfully configured!");
} else {
console.error("Failed to configure git hooks.");
process.exit(1);
}