UNPKG

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