Merge pull request #6024 from CurtisHumphrey/patch-3

Update build-static.js
This commit is contained in:
Michael Shilman 2019-03-16 13:34:39 +08:00 committed by GitHub
commit 5a9f96e23b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,17 +148,14 @@ async function buildPreview(configType, outputDir, packageJson, options) {
}
function prepareFilesStructure(outputDir, defaultFavIcon) {
// clear the output dir
logger.info('clean outputDir..');
shelljs.rm('-rf', outputDir);
// create output directory if not exists
shelljs.mkdir('-p', outputDir);
shelljs.mkdir('-p', path.join(outputDir, 'sb_dll'));
// clear the static dir
shelljs.rm('-rf', path.join(outputDir, 'static'));
shelljs.cp(defaultFavIcon, outputDir);
logger.info('clean outputDir..');
shelljs.rm('-rf', path.join(outputDir, 'static'));
shelljs.cp(defaultFavIcon, outputDir);
}