A Luau tool built with lune to process Luau packages following the Sea of Voices Luau Package Standard for:
- building Roblox model files (
.rbxm) - creating a Roblox test place file (
.rbxl) to run unit tests withrun-in-roblox - bundling into a single Luau file
luabox uses other tools, such as darklua to process Luau code (for compatibility and to inject global variables).
Here are some examples of luaubox commands:
luaubox --target bundle: Create a single luau file<project-name>.luauluaubox --target roblox: Create a Roblox model<project-name>.rbxmluaubox --target roblox --test: Create a Roblox test place filetest-<project-name>.rbxland arunscript which invokesrun-in-robloxwith the place
Note that the --dev argument can be added to inject the development globals (_G.DEV and _G.__DEV__) as true (instead of the default being false).
This project uses npm built-in executable installation feature, so once installed, it will automatically create an executable script to run luaubox.
yarn exec luaubox --help
# or with npm
npm exec luaubox --helpUse luaubox within the usual scripts section of your package.json:
{
"scripts": {
"build": "luaubox --target roblox && luaubox --target roblox --bundle",
"test": "luaubox --target roblox --test && ./build/roblox-test/run"
}
}luaubox needs a few common other tools installed:
For rokit users, simply run the following commands to include the tools in your rokit.toml file:
rokit add seaofvoices/darklua
rokit add lune
rokit add rojoAdd luaubox in your dev-dependencies:
yarn add -D luauboxOr if you are using npm:
npm install --save-dev luauboxThis project is available under the MIT license. See LICENSE.txt for details.