UNPKG

@schemifyjs/cli

Version:
16 lines (15 loc) 648 B
import { askFramework, askPackageManager, askProjectName } from './prompts.js'; import { NewCommand } from './new.executor.js'; export async function createNewCommand(template, flags) { var _a, _b, _c; const name = (_a = flags.name) !== null && _a !== void 0 ? _a : (await askProjectName()); const framework = (_b = flags.framework) !== null && _b !== void 0 ? _b : (await askFramework()); const packageManager = (_c = flags.pm) !== null && _c !== void 0 ? _c : (await askPackageManager()); const options = { name, template, framework, packageManager }; return new NewCommand(options); }