fix(cli): yeoman create failed

This commit is contained in:
chenjiahan
2020-03-08 08:08:35 +08:00
parent bd335b2931
commit b62b9d0311
3 changed files with 666 additions and 422 deletions

View File

@@ -2,6 +2,7 @@ import chalk from 'chalk';
import consola from 'consola';
import { join } from 'path';
import { CWD, GENERATOR_DIR } from './constant';
import Yeoman from 'yeoman-environment';
import Generator from 'yeoman-generator';
const TEMPLATES = join(GENERATOR_DIR, 'templates');
@@ -23,9 +24,9 @@ export class VanGenerator extends Generator {
constructor(name: string) {
super([], {
env: {
env: Yeoman.createEnv([], {
cwd: join(CWD, name),
},
}),
resolved: GENERATOR_DIR,
});