1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const command_1 = require("@anycli/command");
|
4 | const yeoman_environment_1 = require("yeoman-environment");
|
5 | class CommandBase extends command_1.default {
|
6 | async generate(type, generatorOptions = {}) {
|
7 | const env = yeoman_environment_1.createEnv();
|
8 | env.register(require.resolve(`./generators/${type}`), `anycli:${type}`);
|
9 | await env.run(`anycli:${type}`, generatorOptions);
|
10 | }
|
11 | }
|
12 | exports.default = CommandBase;
|