mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
fix(create-vant-cli-app): incorrect compiler-sfc name
This commit is contained in:
@@ -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', '')
|
||||
|
Reference in New Issue
Block a user