Browse Source

fix develop command for all OSes

Shahed Nasser 1 year ago
parent
commit
27940ee9b5
1 changed files with 2 additions and 1 deletions
  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);
 };