From dbeae62709c894390279b51f7ce93da22d64fc24 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Thu, 27 Feb 2025 08:53:02 +0100 Subject: [PATCH] build(copy-dist): simplify "copyNodeModuleFileOrFolder" copying there's no benefit from stripping "node_modules/" from the string, to later add it again using the `DEST_DIR_NODE_MODULES` constant => just copy directly into the `DEST_DIR` folder and preserver the `node_modules` part in the path --- bin/copy-dist.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/copy-dist.ts b/bin/copy-dist.ts index 45514e900..e5f8b6603 100644 --- a/bin/copy-dist.ts +++ b/bin/copy-dist.ts @@ -14,9 +14,7 @@ function log(...args: any[]) { } async function copyNodeModuleFileOrFolder(source: string) { - const adjustedSource = source.substring(13); - const destination = path.join(DEST_DIR_NODE_MODULES, adjustedSource); - + const destination = path.join(DEST_DIR, source); log(`Copying ${source} to ${destination}`); await fs.ensureDir(path.dirname(destination)); await fs.copy(source, destination);