UNPKG

create-mumi

Version:
43 lines (42 loc) 914 B
// src/cli.ts var import_utils = require("@umijs/utils"); var import_path = require("path"); var args = (0, import_utils.yParser)(process.argv.slice(2), { alias: { version: ["v"], help: ["h"] }, boolean: ["version"] }); var cwd = process.cwd(); var [name] = args._; var target = name ? (0, import_path.join)(cwd, name) : cwd; var questions = [ { name: "name", type: "text", message: `Input NPM package name (eg: mumi-vue)` }, { name: "description", type: "text", message: `Input project description` }, { name: "author", type: "text", message: `Input project author (Name <email@example.com>)` } ]; var generator = new import_utils.BaseGenerator({ path: (0, import_path.join)(__dirname, `../templates`), target, data: { version: "^1.0.0" }, questions }); (async function() { await generator.run(); })(); //# sourceMappingURL=cli.js.map