UNPKG

@rist/preset-react

Version:
23 lines (22 loc) 970 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GeneratorCommand = void 0; const abstract_command_1 = require("../../framework/abstract/abstract.command"); class GeneratorCommand extends abstract_command_1.AbstractCommand { load(program) { program .command('generate <schematic> [name] [path]') .alias('g') .description('generate react schematic') .option('-c --component [component-name]') .action(async (schematic, name, path, command) => { const inputs = [], options = []; options.push({ name: 'component', value: command.component }); inputs.push({ name: 'schematic', value: schematic }); inputs.push({ name: 'name', value: name }); inputs.push({ name: 'path', value: path }); await this.action.handle(inputs, options); }); } } exports.GeneratorCommand = GeneratorCommand;