Note
For now this is a quick prototype that works for me.
Lua bundler with replace/vendor modes.
Download the latest binaries from the GitHub Releases page.
Bundle the simple example:
luapack bundle examples/simple/lua/main.lua \
--lua "5.4" \
--path "examples/simple/lua/?.lua" \
--path "examples/simple/lua/?/init.lua" \
--vendor "examples/simple/vendor/lua/?.lua" \
--vendor "examples/simple/vendor/lua/?/init.lua" \
--output examples/simple/dist/simple_bundle.luaRun it with your Lua:
lua examples/simple/dist/simple_bundle.luaAuto-discovery in current directory, supports: luapack.yaml, luapack.yml and
luapack.json as well.
Add a minimal luapack.toml:
[bundle]
lua = "5.4"
paths = [
"lua/?.lua",
"lua/?/init.lua",
]
vendors = [
"vendor/lua/?.lua",
"vendor/lua/?/init.lua",
]
# redact_base = "lua/"
output = "dist/simple_bundle.lua"
diagnostics = trueUsage:
# from the directory containing luapack.toml
luapack bundle lua/main.lua
# or pass it explicitly from anywhere
luapack bundle examples/simple/lua/main.lua --config examples/simple/luapack.tomlSee doc/bundler.md for a deeper overview.
- full_moon used for lua AST parsing
- luabundler inspired the scoping approach
- StyLua project structure, best-practices and full_moon integration
- @jochumdev with AI assistant.
MPL-2.0