1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const command_1 = require("@dxcli/command");
|
4 | const yeoman_environment_1 = require("yeoman-environment");
|
5 | class 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 | }
|
13 | AppCommand.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 | };
|
18 | AppCommand.args = [
|
19 | { name: 'path', required: false }
|
20 | ];
|
21 | exports.default = AppCommand;
|