@cjbarth/github-release-notes
Version:
Create a release from a tag and uses issues or commits to creating the release notes. It also can generate a CHANGELOG.md file based on the release notes (or generate a brand new).
26 lines • 1.34 kB
JavaScript
var _commander = require("commander");
var _chalk = _interopRequireDefault(require("chalk"));
var _examples = _interopRequireDefault(require("./_examples"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var gren = new _commander.Command();
var command;
var commandList = Object.keys(_examples["default"]).filter(function (example) {
return example !== "default" && example !== "generateExamples";
});
gren.name("gren examples").description("See few examples for how to use gren. For more informations (and a bit of UI) check ".concat(_chalk["default"].blue("https://github-tools.github.io/github-release-notes/examples.html"))).usage("<command>").on("--help", function () {
console.log("");
console.log(" Commands:");
console.log("");
console.log(" $ gren examples gren");
console.log(" $ gren examples release");
console.log(" $ gren examples changelog");
console.log("");
}).action(function (cmd) {
command = cmd;
}).parse(process.argv);
if (!command || !commandList.includes(command)) {
console.error("".concat(_chalk["default"].red("You must specify one of these commands to output examples"), " [").concat(commandList.join("|"), "]"));
process.exit(1);
}
_examples["default"].generateExamples(command, _examples["default"][command]);