UNPKG

commitiquette

Version:

Plugin for commitizen to use commitLint config

29 lines (28 loc) 976 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.prompter = void 0; var tslib_1 = require("tslib"); var load_1 = (0, tslib_1.__importDefault)(require("@commitlint/load")); var engine_1 = require("./engine"); function prompter(cz, commit) { return (0, tslib_1.__awaiter)(this, void 0, void 0, function () { var clConfig; return (0, tslib_1.__generator)(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, (0, load_1.default)()]; case 1: clConfig = _a.sent(); (0, engine_1.engine)(clConfig, cz.prompt, commit); return [2 /*return*/]; } }); }); } exports.prompter = prompter; /** * Hacking * * Uncomment the following lines for simplified local development without commitizen. */ // import { prompt } from 'inquirer'; // prompter({ prompt }, value => console.log(value));