feat(cli): add create command

This commit is contained in:
陈嘉涵
2020-01-16 17:06:22 +08:00
parent 38001e59f0
commit 62a1b39b2b
31 changed files with 677 additions and 258 deletions

View 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);
});
}