feat(cli): restart compile when vant config updated

This commit is contained in:
陈嘉涵
2019-12-04 18:10:14 +08:00
parent 2db6e2a44d
commit b19b287276
11 changed files with 152 additions and 105 deletions

View File

@@ -1,7 +1,12 @@
import glob from 'fast-glob';
import { join, parse } from 'path';
import { existsSync, writeFileSync } from 'fs-extra';
import { pascalize, removeExt, getComponents } from '../common';
import { existsSync } from 'fs-extra';
import {
pascalize,
removeExt,
getComponents,
smartOutputFile
} from '../common';
import {
SRC_DIR,
DOCS_DIR,
@@ -64,5 +69,5 @@ ${genExportConfig()}
${genExportDocuments(documents)}
`;
writeFileSync(SITE_DESKTOP_SHARED_FILE, code);
smartOutputFile(SITE_DESKTOP_SHARED_FILE, code);
}