Rogen
Guides

Roblox-ts

Set up Rogen in a roblox-ts project

Updated

With roblox-ts, Rogen reads your uncompiled src folder to work out the routing, then points Rojo at the compiled output, with the extensions swapped to .luau.

Configure Rogen

In the project root, run:

rogen init

Rogen detects roblox-ts and sets up a ts mode. Check that build matches the outDir in your tsconfig.json.

.rogen.json
{
	"source": ["src"],
	"ts": {
		"output": "default.project.json",
		"build": "out"
	},
	"project": {
		"name": "my-ts-game",
		"globIgnorePaths": ["**/package.json", "**/tsconfig.json"],
		"tree": {
			"$className": "DataModel"
		}
	}
}

Run the Pipeline

rbxtsc and Rogen need to run side by side. One easy way to do that is with concurrently:

npm install -D concurrently

Add a script to package.json that starts both watchers:

"scripts": {
	"watch": "concurrently \"rogen watch\" \"rbxtsc -w\""
}

Then run it:

npm run watch

On this page