diff --git a/bin/copy-dist.ts b/bin/copy-dist.ts index 9f52f8a5d..f752782c9 100644 --- a/bin/copy-dist.ts +++ b/bin/copy-dist.ts @@ -18,7 +18,8 @@ function copyNodeModuleFileOrFolder(source: string) { fs.copySync(source, destination); } -const copy = async () => { +try { + log(`Copying build into dist folder.`); fs.copySync("./build", DEST_DIR); @@ -99,8 +100,8 @@ const copy = async () => { for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) { copyNodeModuleFileOrFolder(nodeModuleItem); } -}; + console.log("Copying complete!") -copy() - .then(() => console.log("Copying complete!")) - .catch((err) => console.error("Error during copy:", err)); +} catch(err) { + console.error("Error during copy:", err) +} \ No newline at end of file