chore(create-app): prettier codes

This commit is contained in:
陈嘉涵 2020-01-19 11:44:09 +08:00
parent 1691451813
commit 9993bb16aa
5 changed files with 24 additions and 24 deletions

View File

@ -1,3 +1,3 @@
module.exports = {
presets: ['@vant/cli/preset']
presets: ['@vant/cli/preset'],
};

View File

@ -12,9 +12,9 @@ export default {
color: String,
type: {
type: String,
default: 'primary'
}
}
default: 'primary',
},
},
};
</script>

View File

@ -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 按钮',
},
],
},
],
},
};

View File

@ -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,
});
}

View File

@ -8,8 +8,8 @@ const PROMPTS = [
{
type: 'input',
name: 'name',
message: 'Your package name'
}
message: 'Your package name',
},
];
export default async function run() {