Преглед на файлове

fix develop command for all OSes

Shahed Nasser преди 1 година
родител
ревизия
27940ee9b5
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      develop.mjs

+ 2 - 1
develop.mjs

@@ -105,7 +105,8 @@ const copyToOut = async (file, config) => {
     console.log(`Copying ${file} to ${outputPath}`);
     return;
   }
-  await fs.mkdir(outputPath.replace(/\/[^/]+$/, ""), { recursive: true });
+  let dirNameRegex = new RegExp("\\" + path.sep + "([^\\" + path.sep + "]+)$");
+  await fs.mkdir(outputPath.replace(dirNameRegex, ""), { recursive: true });
   await fs.copyFile(file, outputPath);
 };