UNPKG

1.01 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const command_1 = require("@oclif/command");
4const command_base_1 = require("./command-base");
5class AppCommand extends command_base_1.default {
6 async run() {
7 const { flags, args } = this.parse(AppCommand);
8 const options = flags.options ? flags.options.split(',') : [];
9 await super.generate('app', {
10 type: this.type,
11 path: args.path,
12 options,
13 defaults: flags.defaults,
14 force: flags.force,
15 });
16 }
17}
18AppCommand.flags = {
19 defaults: command_1.flags.boolean({ description: 'use defaults for every setting' }),
20 options: command_1.flags.string({ description: '(yarn|typescript|eslint|mocha)' }),
21 force: command_1.flags.boolean({ description: 'overwrite existing files' }),
22};
23AppCommand.args = [
24 { name: 'path', required: false, description: 'path to project, defaults to current directory' },
25];
26exports.default = AppCommand;