From f245fc9dcd6ceb7098702005c918609c9bdca585 Mon Sep 17 00:00:00 2001 From: ewd3v <74792428+ewd3v@users.noreply.github.com> Date: Sun, 2 Nov 2025 03:30:17 +0100 Subject: [PATCH 1/2] darklua.process files in place --- src/lib.luau | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.luau b/src/lib.luau index f2e412e..d5b1015 100644 --- a/src/lib.luau +++ b/src/lib.luau @@ -398,8 +398,8 @@ function multitarget.build( end for _, buildFile in buildFiles do - local darkluaOutputPath = targetDir.path:join(buildFile):toString() - darklua.process(buildFile, darkluaOutputPath, { + local targetBuildFile = targetDir.path:join(buildFile):toString() + darklua.process(targetBuildFile, targetBuildFile, { rules = rules, }) end From 64fc1e91301175df44c902ff7a1455de91760384 Mon Sep 17 00:00:00 2001 From: ewd3v <74792428+ewd3v@users.noreply.github.com> Date: Sun, 2 Nov 2025 20:18:43 +0100 Subject: [PATCH 2/2] fix build files not being copied over --- src/lib.luau | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/lib.luau b/src/lib.luau index d5b1015..fc032b4 100644 --- a/src/lib.luau +++ b/src/lib.luau @@ -239,6 +239,31 @@ function multitarget.build( local targetDir = pathfs.Directory.new(outputDir.path:join(target)) targetDir:writeDir() -- assure it exists (may not exist later if the user uses "includes" incorrectly, which would throw an undescriptive error later when trying to access this directory) + local globIgnore = {} + if buildFiles then + for _, buildFile in buildFiles do + local destination = targetDir.path:join(buildFile) + local parent = destination:parent() + if parent then + fs.writeDir(parent) + end + + fs.copy(buildFile, destination, true) + + local wdFilePath = pathfs.canonicalize(buildFile):stripPrefix(workingDirPath) + if not wdFilePath then + continue + end + + local wdFilePathStr = wdFilePath:toString() + if fs.isFile(buildFile) then + table.insert(globIgnore, wdFilePathStr) + elseif fs.isDir(buildFile) then + table.insert(globIgnore, wdFilePathStr .. "/**") + end + end + end + -- selene: allow(shadowing) local newPesdeToml = tableHelper.copy(pesdeToml, true) if newPesdeToml.includes then @@ -246,6 +271,7 @@ function multitarget.build( for _, path in glob(include, { cwd = workingDirPath, + ignore = globIgnore, -- We don't have to process these as everything in this list already got copied over in the step above }) do local dest = targetDir.path:join(