mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-11-22 16:26:10 +08:00
empty dir
This commit is contained in:
@@ -37,6 +37,13 @@ function exec(command) {
|
|||||||
throw commandResult.error;
|
throw commandResult.error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function emptyDir(dir) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
fs.rmdir(dir, () => {
|
||||||
|
fs.mkdir(dir, resolve);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function runReactNativeBundleCommand(
|
async function runReactNativeBundleCommand(
|
||||||
bundleName,
|
bundleName,
|
||||||
@@ -47,11 +54,7 @@ async function runReactNativeBundleCommand(
|
|||||||
sourcemapOutput,
|
sourcemapOutput,
|
||||||
config,
|
config,
|
||||||
) {
|
) {
|
||||||
// empty output folder
|
await emptyDir(outputFolder);
|
||||||
fs.unlink(outputFolder, () => {
|
|
||||||
fs.mkdir(outputFolder, () => {});
|
|
||||||
});
|
|
||||||
|
|
||||||
let reactNativeBundleArgs = [];
|
let reactNativeBundleArgs = [];
|
||||||
|
|
||||||
let envArgs = process.env.PUSHY_ENV_ARGS;
|
let envArgs = process.env.PUSHY_ENV_ARGS;
|
||||||
|
|||||||
Reference in New Issue
Block a user