ddc-commit-hooks
Version:
Configurable commit hook setup
16 lines (10 loc) • 416 B
text/typescript
import * as defaults from "./configDefaults";
const rc = require("rc");
const commitMessage = require("./commit-msg");
const preCommit = require("./pre-commit");
const conf = rc("commithooks", defaults.defaults);
const { getCommitMessage } = commitMessage;
const STAGE = process.argv[2];
if (STAGE === "-preCommit") preCommit.check(conf);
if (STAGE === "-commitMsg") getCommitMessage(conf);