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

View File

@@ -1,11 +1,10 @@
import glob from 'fast-glob';
import { join, parse } from 'path';
import { existsSync } from 'fs-extra';
import { existsSync, readdirSync } from 'fs-extra';
import {
pascalize,
removeExt,
getVantConfig,
getComponents,
smartOutputFile
} from '../common';
import {
@@ -96,8 +95,8 @@ function genExportConfig() {
}
export function genSiteDesktopShared() {
const components = getComponents();
const documents = resolveDocuments(components);
const dirs = readdirSync(SRC_DIR);
const documents = resolveDocuments(dirs);
const code = `${genImportConfig()}
${genImportDocuments(documents)}