Rogen IconRogen
Guides

Roblox-ts

Step-by-step setup guide for roblox-ts projects.

Rogen integrates smoothly with roblox-ts. Rogen reads the uncompiled src folder to build the routing map, swaps file extensions to .luau, and points Rojo to the compiled output.

Configure Rogen

Initialize the configuration file via the CLI:

rogen init

Rogen detects roblox-ts and configures a ts mode automatically. Ensure the build path matches the outDir in the tsconfig.json file.

.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

Run the rbxtsc compiler and Rogen simultaneously. Install concurrently to manage both processes:

npm install -D concurrently

Update the package.json script to run both watchers:

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

Run the script:

npm run watch

On this page