@villedemontreal/scripting
Version:
Scripting core utilities
26 lines • 991 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestingExampleScript = void 0;
const core_1 = require("@caporal/core");
const src_1 = require("../../src");
class TestingExampleScript extends src_1.ScriptBase {
get name() {
return `${src_1.TESTING_SCRIPT_NAME_PREFIX}testingExampleScript`;
}
get description() {
return `Project specific script example. Display a lucky number passed as an argument.`;
}
async configure(command) {
command.option(`--lucky <number>`, `A lucky number`, {
required: true,
validator: core_1.program.NUMBER,
});
}
async main() {
const luckyNumber = this.options.lucky;
this.logger.info(`The lucky number is ${luckyNumber}`);
this.logger.debug(`This is a debug message, only displayed if "--verbose" is used.`);
}
}
exports.TestingExampleScript = TestingExampleScript;
//# sourceMappingURL=testingExampleScript.js.map