feat(cli): set title by lang

This commit is contained in:
陈嘉涵
2019-12-09 17:07:01 +08:00
parent cf172f5cbc
commit 396002495f
10 changed files with 75 additions and 25 deletions
@@ -1,12 +1,11 @@
import { join } from 'path';
import { existsSync } from 'fs-extra';
import { existsSync, readdirSync } from 'fs-extra';
import { SRC_DIR, SITE_MODILE_SHARED_FILE } from '../common/constant';
import {
pascalize,
removeExt,
decamelize,
getVantConfig,
getComponents,
smartOutputFile
} from '../common';
@@ -90,8 +89,8 @@ ${genConfig(demos)}
}
export function genSiteMobileShared() {
const components = getComponents();
const code = genCode(components);
const dirs = readdirSync(SRC_DIR);
const code = genCode(dirs);
smartOutputFile(SITE_MODILE_SHARED_FILE, code);
}