docs(changelog test): i test how to automate ChangeLog
This commit is contained in:
19
node_modules/commitizen/dist/cli/parsers/commitizen.js
generated
vendored
Normal file
19
node_modules/commitizen/dist/cli/parsers/commitizen.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.parse = parse;
|
||||
var _minimist = _interopRequireDefault(require("minimist"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
/**
|
||||
* Takes args, parses with minimist and some ugly vudoo, returns output
|
||||
*
|
||||
* TODO: Aww shit this is ugly. Rewrite with mega leet tests plz, kthnx.
|
||||
*/
|
||||
function parse(rawGitArgs) {
|
||||
var args = (0, _minimist.default)(rawGitArgs, {
|
||||
boolean: true
|
||||
});
|
||||
return args;
|
||||
}
|
42
node_modules/commitizen/dist/cli/parsers/git-cz.js
generated
vendored
Normal file
42
node_modules/commitizen/dist/cli/parsers/git-cz.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.parse = parse;
|
||||
const reShortMessage = /^-([a-zA-Z]*)m(.*)$/;
|
||||
const reLongMessage = /^--message(=.*)?$/;
|
||||
|
||||
/**
|
||||
* Strip message declaration from git arguments
|
||||
*/
|
||||
function parse(rawGitArgs) {
|
||||
let result = [];
|
||||
let skipNext = false;
|
||||
for (const arg of rawGitArgs) {
|
||||
let match;
|
||||
if (skipNext) {
|
||||
skipNext = false;
|
||||
continue;
|
||||
}
|
||||
match = reShortMessage.exec(arg);
|
||||
if (match) {
|
||||
if (match[1]) {
|
||||
result.push(`-${match[1]}`);
|
||||
}
|
||||
if (!match[2]) {
|
||||
skipNext = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
match = reLongMessage.exec(arg);
|
||||
if (match) {
|
||||
if (!match[1]) {
|
||||
skipNext = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
result.push(arg);
|
||||
}
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user