Skip to content

Commit bdd80a1

Browse files
committed
Fixed an issue that caused lualib to be a dependency of lualib during build
1 parent 86c67ff commit bdd80a1

File tree

3 files changed

+7
-185
lines changed

3 files changed

+7
-185
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ coverage/
1717
.idea/
1818

1919
typescript_lualib.lua
20+
lualib_bundle.lua
2021

2122
dist/*

src/Compiler.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ export function compileFilesWithOptions(fileNames: string[], options: CompilerOp
9797
});
9898

9999
// Copy lualib to target dir
100-
fs.copyFileSync(
101-
path.resolve(__dirname, "../dist/lualib/lualib_bundle.lua"),
102-
path.join(options.outDir, "lualib_bundle.lua")
103-
);
100+
if (!options.dontRequireLuaLib) {
101+
fs.copyFileSync(
102+
path.resolve(__dirname, "../dist/lualib/lualib_bundle.lua"),
103+
path.join(options.outDir, "lualib_bundle.lua")
104+
);
105+
}
104106
}
105107

106108
export function createTranspiler(checker: ts.TypeChecker,

test/compiler/lualib_bundle.lua

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)