chore(create-vant-cli-app): remove yeoman deps (#9827)

This commit is contained in:
neverland
2021-11-10 09:38:09 +08:00
committed by GitHub
parent 6fc929f317
commit 8d1d029f5d
4 changed files with 51 additions and 1328 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env node
import inquirer from 'inquirer';
import consola from 'consola';
import { prompt } from 'inquirer';
import { ensureDir } from 'fs-extra';
import { VanGenerator } from './generator';
@@ -13,14 +13,13 @@ const PROMPTS = [
},
];
export default async function run() {
const { name } = await inquirer.prompt(PROMPTS);
async function run() {
const { name } = await prompt(PROMPTS);
try {
await ensureDir(name);
const generator = new VanGenerator(name);
generator.run();
await generator.run();
} catch (e) {
consola.error(e);
}