@ldgerrits/rogen 1.4.3 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +6 -6
- package/README.md +112 -33
- package/dist/bundle.cjs +27434 -3834
- package/package.json +103 -66
- package/dist/build.js +0 -252
- package/dist/cli.js +0 -115
- package/dist/config.js +0 -349
- package/dist/constants.js +0 -100
- package/dist/execute.js +0 -128
- package/dist/index.js +0 -115
- package/dist/logger.js +0 -104
- package/dist/route.js +0 -345
- package/dist/tree.js +0 -223
- package/dist/types.js +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright © 2026 Loek Gerrits
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
1
|
+
Copyright © 2026 Loek Gerrits
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
7
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,33 +1,112 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
</
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://rogen-roblox.vercel.app">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/public/icon.png" />
|
|
5
|
+
<img src="docs/public/icon-dark.png" alt="Rogen logo" width="160" />
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
<h1 align="center">Rogen</h1>
|
|
10
|
+
<p align="center">
|
|
11
|
+
<strong>Rojo with file-system routing. Professional-grade architecture for Roblox codebases.</strong>
|
|
12
|
+
</p>
|
|
13
|
+
<p align="center">
|
|
14
|
+
Rogen is a superset of Rojo that generates Rojo project files from your file system. Put code in a <code>Server</code> or <code>Client</code> folder, or add <code>@Server</code> to a file's name, and Rogen sends it to the right place.
|
|
15
|
+
</p>
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/@ldgerrits/rogen"><img alt="Beta release" src="https://img.shields.io/npm/v/@ldgerrits/rogen/next?style=flat-square&label=beta" /></a>
|
|
18
|
+
<a href="https://rogen-roblox.vercel.app/docs/v2"><img alt="Documentation" src="https://img.shields.io/badge/docs-website-blueviolet?style=flat-square" /></a>
|
|
19
|
+
<a href="https://discord.com/channels/385151591524597761/1503801029232295996"><img alt="Discord" src="https://img.shields.io/badge/discord-chat-5865F2?style=flat-square&logo=discord&logoColor=white" /></a>
|
|
20
|
+
<a href="https://github.com/LDGerrits/rogen/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/LDGerrits/rogen?style=flat-square&logo=github" /></a>
|
|
21
|
+
<a href="https://luau.org"><img alt="Luau" src="https://img.shields.io/badge/Luau-00A2FF?style=flat-square&logo=luau&logoColor=white" /></a>
|
|
22
|
+
<a href="https://roblox-ts.com"><img alt="roblox-ts" src="https://img.shields.io/badge/roblox--ts-3178C6?style=flat-square&logo=typescript&logoColor=white" /></a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
## Why Rogen?
|
|
26
|
+
|
|
27
|
+
- **Organize by feature** — Group all code, UI, and assets for a specific feature in one place. This gives you high cohesion, better scalability, fewer merge conflicts, and features that are simple to maintain or delete.
|
|
28
|
+
- **Enforce boundaries** — Keep coupling low with a linter. Every path names its feature, so a [lint rule](https://rogen-roblox.vercel.app/docs/v2/architectures) can stop one feature from requiring another.
|
|
29
|
+
- **Multi-place games** — Write shared code once and use it in every place. When one place needs something different, add a file with the same name to that place's folder, and it overwrites the shared one there.
|
|
30
|
+
- **Still Rojo** — Rogen runs the Rojo commands you use, with the same flags. One tool, and nothing to relearn.
|
|
31
|
+
|
|
32
|
+
## Built for agents
|
|
33
|
+
|
|
34
|
+
When an agent works on a feature, everything it needs is in one folder, from server to client. It spends its context on your task instead of searching the codebase.
|
|
35
|
+
|
|
36
|
+
Running several agents? Give each one a feature. A lint rule catches any agent that makes one feature require another, and there's no shared project file to conflict on.
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
`default.rogen.json` is a Rojo project file with `routes` added. The `tree` is the base: put in it what folder names can't say, such as your packages, and Rogen adds every routed file to it:
|
|
41
|
+
|
|
42
|
+
<!-- prettier-ignore -->
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"name": "my-game",
|
|
46
|
+
"routes": {
|
|
47
|
+
"Server": "ServerScriptService",
|
|
48
|
+
"Client": "StarterPlayer/StarterPlayerScripts",
|
|
49
|
+
"Shared": "ReplicatedStorage/Shared",
|
|
50
|
+
"*": "ReplicatedStorage/Shared"
|
|
51
|
+
},
|
|
52
|
+
"tree": {
|
|
53
|
+
"$className": "DataModel",
|
|
54
|
+
"ReplicatedStorage": {
|
|
55
|
+
"Packages": { "$path": "Packages" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
A folder or an `@` suffix named after a route sends its code there. The `*` route takes every file that matches no other:
|
|
62
|
+
|
|
63
|
+
| In `src/Inventory` | Goes to |
|
|
64
|
+
| --------------------------------- | ---------------------------------------------- |
|
|
65
|
+
| `Server/InventoryService.luau` | `ServerScriptService/Inventory` |
|
|
66
|
+
| `Client/InventoryController.luau` | `StarterPlayer/StarterPlayerScripts/Inventory` |
|
|
67
|
+
| `Shared/InventoryTypes.luau` | `ReplicatedStorage/Shared/Inventory` |
|
|
68
|
+
| `Save@Server.luau` | `ServerScriptService/Inventory` |
|
|
69
|
+
| `InventoryConfig.luau` | `ReplicatedStorage/Shared/Inventory` |
|
|
70
|
+
|
|
71
|
+
The routes are yours to change. Add `"Gui": "StarterGui"`, and a `Gui` folder or a `@Gui` suffix sends code to StarterGui.
|
|
72
|
+
|
|
73
|
+
## Installation
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
rokit add ldgerrits/rogen@2.0.0-beta.1
|
|
77
|
+
rogen init
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`rogen init` pins Rojo in `rokit.toml` and tells you to run `rokit install` to fetch it. New to Rojo? Also run `rogen plugin install` to add its Studio plugin. Prefer npm? Run `npm i @ldgerrits/rogen@next` and use `npx rogen`.
|
|
81
|
+
|
|
82
|
+
## Usage
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
rogen serve # Serve with Rojo and update the project file on changes
|
|
86
|
+
rogen build -o game.rbxl # Update the project file, then build a place with Rojo
|
|
87
|
+
rogen check # Print warnings and errors, and exit 1 on any
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`sourcemap`, `upload`, `syncback` and `plugin` take Rojo's flags too. See the [documentation](https://rogen-roblox.vercel.app/docs/v2) for every command.
|
|
91
|
+
|
|
92
|
+
## FAQ
|
|
93
|
+
|
|
94
|
+
#### Does Rogen replace Rojo?
|
|
95
|
+
|
|
96
|
+
Yes and no. You run `rogen` instead of `rojo`, but Rojo still does the syncing and building underneath. Its Studio plugin stays installed too.
|
|
97
|
+
|
|
98
|
+
#### Does Rogen work with Argon?
|
|
99
|
+
|
|
100
|
+
Yes, for syncing your files into Studio. Run `rogen write --watch` and serve with Argon. To bring Studio changes back, save the place and run `rogen syncback --input game.rbxl`. With Rojo, it's one command: `rogen serve` keeps the project file current and serves it.
|
|
101
|
+
|
|
102
|
+
#### Can I use Rogen in an existing Rojo project?
|
|
103
|
+
|
|
104
|
+
Yes. Run `rogen init` to move it to Rogen. See [Coming from Rojo](https://rogen-roblox.vercel.app/docs/v2/coming-from-rojo).
|
|
105
|
+
|
|
106
|
+
## Contributing
|
|
107
|
+
|
|
108
|
+
Read the [contributing guide](CONTRIBUTING.md) before you open a pull request. You can also star the repo or [sponsor its development](https://github.com/sponsors/LDGerrits).
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
Rogen is [MIT licensed](LICENSE.md).
|