LuBu is a simle lua bundler which allows you to compress .lua and .dll modules into one.
See example-project
folder
- install lubu.exe from the latest release
- create
lubu.json
file in your project folder - set up your config
- use
lubu.exe lubu.json
LuBu config must have fields "modules", "modules" and "output". Also you can add some constants in "const"
main
-string
- path to main filemodules
-map[string]string
- .lua modules list, where key is module name (using inrequire()
), value is a path to moduledll
-map[string]string
- .dll modules list, where key is module name (using inrequire()
), value is a path to moduleoutput
-string
- path to bundled fileconst
-map[string]interface{}
- constants list, where key is variable name and value is a constant value. Only string, number and bool are supported
{
"main": "src/init.lua",
"modules": {
"add": "src/add.lua",
"mul": "src/mul.lua"
},
"dll": {
"lfs": "/src/lfs.dll"
},
"output": "dist/release.lua",
"const": {
"DEV": false,
"BUNDLED": true,
"VERSION": "1.0.0"
}
}
Also you can find auto json generator in example
folder. Run it using go run generate-lubu-config.go
my-project/
├── src/
│ ├── lfs.dll
│ ├── init.lua
│ ├── add.lua
│ └── mul.lua
└── lubu.json
git clone https://github.com/chaposcripts/lubu/
cd lubu
go build
or usego build && lubu.exe lubu.json
to run it after building
- add .dll modules support (Done!)
- add resource bundler (ttf, png, etc.)