An example project that bundles the Roblox-TS source into a single file and uploads it to a GitHub release.
There is a place.project.json
file for development in Roblox Studio. Use the Rojo VSCode extension to sync the project.
You can run releases with these snippets:
-- Run the latest release
loadstring(game:HttpGetAsync("https://github.com/richie0866/rbxts-bundle-example/releases/latest/download/main.lua"))()
-- Run a specific release
loadstring(game:HttpGetAsync("https://github.com/richie0866/rbxts-bundle-example/releases/download/1.1.1/main.lua"))()
- PNPM - A fast, disk space efficient package manager
- Aftman - Install command-line tools and use them seamlessly
Running pnpm bundle
creates the following files:
dist/main.lua
- The bundled, minified sourcedist/main-dev.lua
- The unminified source with preserved error tracebackdist/main.rbxm
- The Roblox model created by Rojo
# Install dependencies
pnpm install
# Install Aftman tools
aftman install
# Build the Luau source or watch for changes
pnpm build/watch
# Bundle the project to dist/main.lua and dist/main-dev.lua
pnpm bundle
- Roblox-TS compiles ternary operators to Luau if-then-else expressions, which may not be supported in some environments.