lua-users home
lua-l archive

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


On Oct 28, 2013, at 10:18 PM, allanpfalzgraf@eaton.com wrote:

> We would like to compile Lua scripts and all their 'required' .lua files into a single output file that would have no dependencies other than .dll files.
> Any thoughts?

Sure. 'luac' supports multiple files as input.

E.g.

$ luac -o all-in-one.luac module1.lua module2.lua module3.lua ... 

Now ' all-in-one.luac' is a compiled aggregation of all the individual lua source files.

Two things to watch out for:

(1) Make sure that your modules are indeed, hmmm, modular 
(2) Handle dependencies order somehow

Just a small matter of programming :)