From 9ba3032a926e8383a766e82be4d57125b9649d44 Mon Sep 17 00:00:00 2001 From: Kit Swinton Date: Fri, 20 Oct 2023 11:07:22 +1100 Subject: [PATCH] added relative path in build folder creation --- build.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index 6b55591..b3f821a 100644 --- a/build.js +++ b/build.js @@ -47,14 +47,14 @@ files.forEach( file => { }); fs.cp('./src/styles','./build/styles', { recursive: true }, (err) => { - if (err) throw err; + if (err) throw err; }); function ensureDirectoryExists(filePath) { var dirname = filePath.split('/').slice(0,-1).join('/'); - if (fs.existsSync(dirname)) { - return true; + if (fs.existsSync("./" + dirname)) { + return true; } ensureDirectoryExists(dirname); fs.mkdirSync(dirname);