UNPKG

1.25 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const tslib_1 = require("tslib");
4const path_1 = require("path");
5const yargs_1 = tslib_1.__importDefault(require("yargs"));
6const command_1 = require("../cli/command");
7const generate_1 = require("./generate");
8const init_1 = require("./init");
9const validate_1 = require("./validate");
10const migrate_1 = require("./migrate");
11exports.rootCmd = yargs_1.default
12 .scriptName("kosko")
13 .exitProcess(false)
14 .option("cwd", {
15 type: "string",
16 describe: "Path of working directory",
17 global: true,
18 default: process.cwd(),
19 defaultDescription: "CWD",
20 coerce(arg) {
21 return path_1.isAbsolute(arg) ? arg : path_1.resolve(arg);
22 }
23})
24 .option("silent", {
25 type: "boolean",
26 describe: "Disable log output",
27 global: true,
28 default: false
29})
30 .group(["cwd", "silent", "help", "version"], "Global Options:")
31 .command(command_1.wrapCommand(init_1.initCmd))
32 .command(command_1.wrapCommand(generate_1.generateCmd))
33 .command(command_1.wrapCommand(validate_1.validateCmd))
34 .command(command_1.wrapCommand(migrate_1.migrateCmd))
35 .demandCommand();
36//# sourceMappingURL=root.js.map
\No newline at end of file