lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 03.02.2014 00:05, schrieb Karol Drożak:

Can I merge all the source files into one output file?

Assuming you have a main.lua and a module1.lua, you can preload the lua module in your main.lua
--8< ------------------------------------------------------------
package.preload["module1"] = function(...)
  <copy-and-paste your module1.lua here>
end

<main.lua content>
--8< ------------------------------------------------------------


Ulrich.