neverland 8bc6169ae1
chore(deps): bump consola v3 and rimraf v5 (#11751)
* chore(deps): bump consola v3 and rimraf v5

* chore: revert demo
2023-04-15 09:36:41 +08:00

25 lines
487 B
JavaScript

#!/usr/bin/env node
import { consola } from 'consola';
import { prompt } from 'enquirer';
import { ensureDir } from 'fs-extra';
import { VanGenerator } from './generator';
async function run() {
const { name } = await prompt<{ name: string }>({
type: 'input',
name: 'name',
message: 'Your package name',
});
try {
await ensureDir(name);
const generator = new VanGenerator(name);
await generator.run();
} catch (e) {
consola.error(e);
}
}
run();