fix(create-vant-cli-app): incorrect compiler-sfc name

This commit is contained in:
chenjiahan
2020-11-29 10:50:56 +08:00
parent 5ac8aa7f7a
commit d36d23a4c7
25 changed files with 3 additions and 6 deletions

View File

@@ -6,7 +6,6 @@ import { CWD, GENERATOR_DIR } from './constant';
import Yeoman from 'yeoman-environment';
import Generator from 'yeoman-generator';
const TEMPLATES_ROOT = join(GENERATOR_DIR, 'templates');
const PROMPTS = [
{
name: 'vueVersion',
@@ -64,14 +63,12 @@ export class VanGenerator extends Generator {
writing() {
consola.info(`Creating project in ${join(CWD, this.inputs.name)}\n`);
const templatePath = join(TEMPLATES_ROOT, this.inputs.vueVersion);
const templatePath = join(GENERATOR_DIR, this.inputs.vueVersion);
const templateFiles = glob.sync(join(templatePath, '**', '*'), {
dot: true,
});
const destinationRoot = this.destinationRoot();
console.log(templateFiles);
templateFiles.forEach((filePath) => {
const outputPath = filePath
.replace('.tpl', '')