mirror of
https://github.com/youzan/vant.git
synced 2026-01-28 01:10:04 +08:00
feat(cli): add create command
This commit is contained in:
15
packages/vant-cli/src/commands/create.ts
Normal file
15
packages/vant-cli/src/commands/create.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { GENERATOR_DIR, CWD } from '../common/constant';
|
||||
import { VantCliGenerator } from '../compiler/vant-cli-generator';
|
||||
|
||||
export async function create() {
|
||||
const generator = new VantCliGenerator([], {
|
||||
env: {
|
||||
cwd: CWD
|
||||
},
|
||||
resolved: GENERATOR_DIR
|
||||
});
|
||||
|
||||
return new Promise(resolve => {
|
||||
generator.run(resolve);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user