Guides
Roblox-ts
Set up Rogen in a roblox-ts project
Updated
You're reading the docs for Rogen v1
Rogen v2 is the recommended version. Migrate a project to v2 or read the v2 docs.
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 initRogen detects roblox-ts and sets up a ts mode. Check that build matches the outDir in your tsconfig.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 concurrentlyAdd a script to package.json that starts both watchers:
"scripts": {
"watch": "concurrently \"rogen watch\" \"rbxtsc -w\""
}Then run it:
npm run watch