chore(cli): improve build tasks

This commit is contained in:
陈嘉涵
2020-01-15 14:50:04 +08:00
parent 6104ecb352
commit ed51b08011
3 changed files with 114 additions and 123 deletions
-16
View File
@@ -1,5 +1,4 @@
import { join } from 'path';
import { execSync } from 'child_process';
import {
lstatSync,
existsSync,
@@ -156,19 +155,4 @@ export function smartOutputFile(filePath: string, content: string) {
outputFileSync(filePath, content);
}
let hasYarnCache: boolean;
export function hasYarn() {
if (hasYarnCache === undefined) {
try {
execSync('yarn --version', { stdio: 'ignore' });
hasYarnCache = true;
} catch (e) {
hasYarnCache = false;
}
}
return hasYarnCache;
}
export { getVantConfig };