luarocks
luarocks copied to clipboard
rockspec: Possibility to recursively install pure Lua modules from a specific directory ?
Hi,
For pure Lua modules with lot of files/sub-directories, where the directory structure (sanely) matches the Lua modules structure, writing manually every single file path is redundant and error prone (ex: projects forgetting to make revisions of scm rockspecs after adding/removing/renaming files).
I saw that the lua
directory will be copied where the modules are copied, but it's forcing projects to have a specific structure for Luarocks and it's implicit, not very clear (it may even be an issue if there is a lua
directory not intended to Luarocks).
Is it already possible from the rockspec in a non-straightforward way ? I couldn't find what I want from the doc.
Why not adding a syntax for installing recursively from a directory which contains directories/modules ?
Ex:
lua_modules_root = "src/"
Or more versatile:
lua_directories= {
[""] = "src/", -- root
MyModule = "src/", -- all prefixed by "MyModule"
["MyModule.Extensions"] = "src/" -- all prefixed by "MyModule.Extensions"
-- etc
}