Skip to content

Repository files navigation

checks version GitHub top language license npm

ko-fi

luaubox

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 with run-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>.luau
  • luaubox --target roblox: Create a Roblox model <project-name>.rbxm
  • luaubox --target roblox --test: Create a Roblox test place file test-<project-name>.rbxl and a run script which invokes run-in-roblox with 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).

Usage

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 --help

Use 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"
  }
}

Required Tools

luaubox needs a few common other tools installed:

  • lune: to run luaubox itself!
  • darklua: to process Luau code
  • rojo: to build Roblox models

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 rojo

Installation

Add luaubox in your dev-dependencies:

yarn add -D luaubox

Or if you are using npm:

npm install --save-dev luaubox

License

This project is available under the MIT license. See LICENSE.txt for details.

About

A tool for building Luau projects into Roblox models, bundles and more

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages