From 281b10c28c1e299de57c58d08d0f842b72141dcc Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Thu, 12 Jan 2023 22:38:30 -0800 Subject: [PATCH] Use relative path to create build dir --- packages/webamp/scripts/moveLibrary.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/webamp/scripts/moveLibrary.js b/packages/webamp/scripts/moveLibrary.js index 4898ba99..42983fd1 100644 --- a/packages/webamp/scripts/moveLibrary.js +++ b/packages/webamp/scripts/moveLibrary.js @@ -4,8 +4,8 @@ const fs = require("fs"); const path = require("path"); -const BUILD_DIR = "../built"; -const DIST_DIR = "../dist"; +const BUILD_DIR = path.join(__dirname, "../built"); +const DIST_DIR = path.join(__dirname, "../dist"); const TARGETS = [ { @@ -32,10 +32,10 @@ console.log("Copying build artifacts to their old Webpack locations:"); for (const target of TARGETS) { const from = path.join(DIST_DIR, target.parcelPath); const to = path.join(BUILD_DIR, target.webpackName); - fs.copyFileSync(path.join(__dirname, from), path.join(__dirname, to)); + fs.copyFileSync(from, to); console.log(`Copied "${from}" to "${to}".`); const fromMap = `${from}.map`; const toMap = `${to}.map`; console.log(`Copied "${fromMap}" to "${toMap}".`); - fs.copyFileSync(path.join(__dirname, fromMap), path.join(__dirname, toMap)); + fs.copyFileSync(fromMap, toMap); }