UNPKG

@decaf-ts/utils

Version:

module management utils for decaf-ts

29 lines 943 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.printCommandHelp = printCommandHelp; function printCommandHelp(log, commandName, summary, usage, options, notes = [], examples = []) { log.info(`${commandName}`); log.info(summary); log.info(`Usage: ${usage}`); log.info("Options:"); for (const option of options) { const suffix = option.defaultValue ? ` (default: ${option.defaultValue})` : ""; log.info(` ${option.flag} ${option.description}${suffix}`); } if (notes.length > 0) { log.info("Notes:"); for (const note of notes) { log.info(` ${note}`); } } if (examples.length > 0) { log.info("Examples:"); for (const example of examples) { log.info(` ${example}`); } } } //# sourceMappingURL=help.command.js.map //# sourceMappingURL=help.command.cjs.map