mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 08:37:23 +00:00
fix(cli): yeoman create failed
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user