Rogen
Guides

Darklua

Set up Rogen with Darklua

Updated

Darklua applies rules to your code and writes the result to a build folder. Rogen picks it up when there's a .darklua.json or .darklua.json5 in the project root.

Define the Build Directory

This guide assumes Darklua reads from src and writes to dist.

Configure Rogen

In the project root, run:

rogen init

Rogen detects Darklua and adds a darklua mode to .rogen.json. Check that build matches Darklua's output folder.

.rogen.json
{
	"source": ["src"],
	"darklua": {
		"output": "build.project.json",
		"build": "dist"
	},
	"project": {
		"name": "my-darklua-game",
		"tree": {
			"$className": "DataModel"
		}
	}
}

Rogen still reads src to work out the routing, but points the paths in the project file at dist.

Run the Pipeline

Run Darklua in watch mode to process src into dist, with Rogen watching alongside it:

darklua process src dist --watch
rogen watch

On this page