UNPKG

983 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const command_1 = require("@dxcli/command");
4const yeoman_environment_1 = require("yeoman-environment");
5class AppCommand extends command_1.default {
6 async run() {
7 const env = yeoman_environment_1.createEnv();
8 env.register(require.resolve('./generators/app'), 'dxcli:app');
9 const options = this.flags.options ? this.flags.options.split(',') : [];
10 await env.run('dxcli:app', { type: this.type, path: this.args.path, options, defaults: this.flags.defaults, force: this.flags.force });
11 }
12}
13AppCommand.flags = {
14 defaults: command_1.flags.boolean({ description: 'use defaults for every setting' }),
15 options: command_1.flags.string({ description: '(typescript|semantic-release|mocha)' }),
16 force: command_1.flags.boolean({ description: 'overwrite existing files' }),
17};
18AppCommand.args = [
19 { name: 'path', required: false }
20];
21exports.default = AppCommand;