diff --git a/packages/create-vant-cli-app/generators/templates/babel.config.js b/packages/create-vant-cli-app/generators/templates/babel.config.js index 27fec6e80..fa5ee221e 100644 --- a/packages/create-vant-cli-app/generators/templates/babel.config.js +++ b/packages/create-vant-cli-app/generators/templates/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: ['@vant/cli/preset'] + presets: ['@vant/cli/preset'], }; diff --git a/packages/create-vant-cli-app/generators/templates/src/demo-button/index.vue b/packages/create-vant-cli-app/generators/templates/src/demo-button/index.vue index e5e9e8947..29ac1d504 100644 --- a/packages/create-vant-cli-app/generators/templates/src/demo-button/index.vue +++ b/packages/create-vant-cli-app/generators/templates/src/demo-button/index.vue @@ -12,9 +12,9 @@ export default { color: String, type: { type: String, - default: 'primary' - } - } + default: 'primary', + }, + }, }; diff --git a/packages/create-vant-cli-app/generators/templates/vant.config.js b/packages/create-vant-cli-app/generators/templates/vant.config.js index 743235e47..749ef1a35 100644 --- a/packages/create-vant-cli-app/generators/templates/vant.config.js +++ b/packages/create-vant-cli-app/generators/templates/vant.config.js @@ -5,8 +5,8 @@ module.exports = { preprocessor: '<%= preprocessor %>', }, site: { - publicPath: '/<%= name %>/' - } + publicPath: '/<%= name %>/', + }, }, site: { title: '<%= name %>', @@ -17,23 +17,23 @@ module.exports = { items: [ { path: 'home', - title: '介绍' + title: '介绍', }, { path: 'quickstart', - title: '快速上手' - } - ] + title: '快速上手', + }, + ], }, { title: '基础组件', items: [ { path: 'demo-button', - title: 'DemoButton 按钮' - } - ] - } - ] - } + title: 'DemoButton 按钮', + }, + ], + }, + ], + }, }; diff --git a/packages/create-vant-cli-app/src/generator.ts b/packages/create-vant-cli-app/src/generator.ts index 110e8060c..6e7f2554b 100644 --- a/packages/create-vant-cli-app/src/generator.ts +++ b/packages/create-vant-cli-app/src/generator.ts @@ -10,23 +10,23 @@ const PROMPTS = [ name: 'preprocessor', message: 'Select css preprocessor', type: 'list', - choices: ['Less', 'Sass'] - } + choices: ['Less', 'Sass'], + }, ]; export class VanGenerator extends Generator { inputs = { name: '', cssLang: '', - preprocessor: '' + preprocessor: '', }; constructor(name: string) { super([], { env: { - cwd: join(CWD, name) + cwd: join(CWD, name), }, - resolved: GENERATOR_DIR + resolved: GENERATOR_DIR, }); this.inputs.name = name; @@ -76,7 +76,7 @@ export class VanGenerator extends Generator { npm: false, bower: false, yarn: true, - skipMessage: true + skipMessage: true, }); } diff --git a/packages/create-vant-cli-app/src/index.ts b/packages/create-vant-cli-app/src/index.ts index 560c9be5c..7abcc0ef1 100644 --- a/packages/create-vant-cli-app/src/index.ts +++ b/packages/create-vant-cli-app/src/index.ts @@ -8,8 +8,8 @@ const PROMPTS = [ { type: 'input', name: 'name', - message: 'Your package name' - } + message: 'Your package name', + }, ]; export default async function run() {