File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ export class LuaTranspiler {
5555 return 0 ;
5656 }
5757
58+ public emitLuaLib ( ) : string {
59+ const outPath = path . join ( this . options . outDir , "lualib_bundle.lua" ) ;
60+ fs . copyFileSync (
61+ path . resolve ( __dirname , "../dist/lualib/lualib_bundle.lua" ) ,
62+ outPath
63+ ) ;
64+ return outPath ;
65+ }
66+
5867 public emitFilesAndReportErrors ( ) : number {
5968 const error = this . reportErrors ( ) ;
6069 if ( error > 0 ) {
@@ -67,10 +76,7 @@ export class LuaTranspiler {
6776 if ( this . options . luaLibImport === LuaLibImportKind . Require
6877 || this . options . luaLibImport === LuaLibImportKind . Always
6978 ) {
70- fs . copyFileSync (
71- path . resolve ( __dirname , "../dist/lualib/lualib_bundle.lua" ) ,
72- path . join ( this . options . outDir , "lualib_bundle.lua" )
73- ) ;
79+ this . emitLuaLib ( ) ;
7480 }
7581
7682 return 0 ;
You can’t perform that action at this time.
0 commit comments