single-dir.lua
Gather all dependencies of Lua module together
Usage
$ lua -l single-dir your-application.luaDescription
All C and Lua modules used by your application are copied to
directory "single-dir-out/modules". Directory "single-dir-out/"
can be used as a distribution package. To run your Lua
application using modules from directory
"single-dir-out/modules", set LUA_PATH and LUA_CPATH as
follows:
$ export LUA_PATH="modules/?.lua;modules/?/init.lua"
$ export LUA_CPATH="modules/?.so"
$ lua your-application.luaReplace modules with absolute path to that directory.
Create bash and batch scripts, which do this automatically and run Lua module:
$ make-single-dir your-application.luaCheck directory "single-dir-out/" for bash and batch scripts.
File "single-dir-out/single-file.lua" is composed from all Lua
modules (including bytecode). It sets appropriate loaders in
package.preload. Require it or load with -l to get all Lua
dependencies ready to require.