[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] mergelua
- From: Sebastien Lai <237482@...>
- Date: Sat, 15 Oct 2011 23:22:38 +0200
Hello readers of lua-l,
I'm happy to announce a little utility of mine, called 'mergelua':
https://github.com/beelzebub/mergelua
This tool allows merging of (pure, noncompiled) Lua modules into a
single collective file.
It can be used to create packages of your Lua modules, similar to what
golang does, except that mergelua creates a single file.
Mergelua also features a local override of the 'require' function to
search the local moduletable first, and then execute the global
require() if the module does not exist in mergelua.
Synopsis:
merge.lua <outputfilename> <modulename>=<modulepath>
<anothermodule>=<anotherpath>
Example:
merge.lua collection.lua oop=../oop.lua/oop.lua
configfile=../configfile/configfile.lua
There are probably a few things that might be tweaked:
+ minifying of Lua code (removing comments, newlines, etc)
+ support of bytecode-compiled chunks (unfortunately, I have yet to
find out how to store the data)
+ storing of .so / .dll files (same problem as above)
Please tell me what you think!