Guides
Multi-Place
Share code across several places in one repo
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.
Give each place its own config that combines the shared code with that place's own folder.
Structure the Repository
Keep shared code and each place's code in separate folders:
MY-GAME
- src
- core
- lobby
- match
Configure the Lobby Place
Create a config for the lobby, and list both folders in source:
{
"source": ["core", "lobby"],
"luau": {
"output": "lobby.project.json",
"build": "src"
},
"project": {
"name": "lobby",
"tree": {
"$className": "DataModel"
}
}
}Rogen reads every folder you list and merges them into one tree.
Configure the Match Place
Then do the same for the match:
{
"source": ["core", "match"],
"luau": {
"output": "match.project.json",
"build": "src"
},
"project": {
"name": "match",
"tree": {
"$className": "DataModel"
}
}
}Start Watching
Choose which config to build with -c or --config:
rogen watch --config lobby.rogen.jsonIf two folders have a file at the same path, the one listed last in
source wins.