chore(cli): update eslint config and prettier codes

This commit is contained in:
陈嘉涵
2020-01-19 11:42:22 +08:00
parent 633e9cf59d
commit 1691451813
52 changed files with 383 additions and 363 deletions
@@ -7,7 +7,7 @@ import {
decamelize,
getVantConfig,
smartOutputFile,
normalizePath
normalizePath,
} from '../common';
type DemoItem = {
@@ -25,7 +25,10 @@ import './package-style';
function genImports(demos: DemoItem[]) {
return demos
.map(item => `import ${item.name} from '${removeExt(normalizePath(item.path))}';`)
.map(
item =>
`import ${item.name} from '${removeExt(normalizePath(item.path))}';`
)
.join('\n');
}
@@ -73,7 +76,7 @@ function genCode(components: string[]) {
.map(component => ({
component,
name: pascalize(component),
path: join(SRC_DIR, component, 'demo/index.vue')
path: join(SRC_DIR, component, 'demo/index.vue'),
}))
.filter(item => existsSync(item.path));