UNPKG

@interaktiv/dia-scripts

Version:

CLI toolbox with common scripts for most sort of projects at DIA

31 lines (23 loc) 549 B
"use strict"; const path = require('path'); const exit = require('exit'); const { bootstrap } = require('commitizen/dist/cli/git-cz'); const config = require('../config/czrc'); const { isOptedIn } = require('../utils'); const here = p => path.join(__dirname, p); (function () { if (isOptedIn('prepare-commit-msg') === false) { exit(0); return; } const rawArgv = [...process.argv]; const argv = [...new Set(rawArgv), '--hook']; bootstrap({ cliPath: here('../../node_modules/commitizen'), config }, argv); })();