UNPKG

904 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const command_1 = require("@oclif/command");
4class Goodbye extends command_1.Command {
5 async run() {
6 const { args, flags } = this.parse(Goodbye);
7 const name = flags.name || 'world';
8 this.log(`hello ${name} from /root/cli/tmp/examples/example-multi-ts/src/commands/goodbye.ts`);
9 if (args.file && flags.force) {
10 this.log(`you input --force and --file: ${args.file}`);
11 }
12 }
13}
14Goodbye.description = 'describe the command here';
15Goodbye.flags = {
16 help: command_1.flags.help({ char: 'h' }),
17 // flag with a value (-n, --name=VALUE)
18 name: command_1.flags.string({ char: 'n', description: 'name to print' }),
19 // flag with no value (-f, --force)
20 force: command_1.flags.boolean({ char: 'f' }),
21};
22Goodbye.args = [{ name: 'file' }];
23exports.default = Goodbye;