feat(cli): speedup dev command

This commit is contained in:
陈嘉涵 2019-12-05 19:46:23 +08:00
parent 8ee35ce5b5
commit 187b72483c

View File

@ -32,10 +32,14 @@ function compileTempDir(dir: string): Promise<unknown> {
const filePath = join(dir, filename); const filePath = join(dir, filename);
if (isDir(filePath)) { if (isDir(filePath)) {
if (filePath.includes('/test') || filePath.includes('/demo')) {
return Promise.resolve();
}
return compileTempDir(filePath); return compileTempDir(filePath);
} }
if (filename.indexOf('index') !== -1) { if (filename.includes('index')) {
if (isSfc(filePath)) { if (isSfc(filePath)) {
return compileSfc(filePath, { skipStyle: true }); return compileSfc(filePath, { skipStyle: true });
} }