1
0
CLI tool for creating Roblox scripts using TypeScript.
Go to file
2024-11-04 23:29:27 +00:00
src update(0.9.0): add .prettierrc, fix __dirname for older nodejs versions 2024-11-04 23:29:27 +00:00
template update(0.9.0): add .prettierrc, fix __dirname for older nodejs versions 2024-11-04 23:29:27 +00:00
.gitignore update(0.8.0): rename _gitignore to .gitignore 2024-10-16 10:20:53 +01:00
.prettierrc update(0.9.0): add .prettierrc, fix __dirname for older nodejs versions 2024-11-04 23:29:27 +00:00
LICENSE update(0.0.2): implement better minifier, save space on smaller scripts 2024-09-17 21:28:15 +01:00
package.json update(0.9.0): add .prettierrc, fix __dirname for older nodejs versions 2024-11-04 23:29:27 +00:00
README.md update(0.8.3): update readme.md and roblox-ts-script package 2024-10-16 21:29:29 +01:00

Create Roblox-TS Script

Builds & bundles TypeScript source files into a Lua script, which you can use on Roblox.

Prerequisites

Make sure the following are installed:

The following are automatically installed; if it fails, install manually:

Instructions

  1. Create Project

    Run the following in a terminal, and follow the instructions:

    (p)npm create roblox-ts-script
    
  2. Develop

    Once the script has created your project, open it in an IDE, preferably VSCode.

    In the VSCode Terminal, you can execute pnpm dev / npm run dev. Now you can edit files in src, and it will compile to out when you save.

  3. Build

    If you'd like to manually start the build process, instead of running the dev script, run npm run build / pnpm build which will build once.

  4. Sync (optional)

    If you want to test your script on Roblox Studio, run the following once: rojo plugin install.

    Then, simply run pnpm dev-sync / npm run dev-sync and connect on Roblox Studio (look for Rojo in the Plugins section).

  5. Deploy (optional)

    If you chose to initialize a git repository, and have it connected to a remote GitHub repo, you can run pnpm release / npm run release to create a release with the script attached.

    Only do this once you've made changes and pushed them to the main branch. Otherwise, it won't do anything.

  6. Packages (optional)

    You can install roblox-ts packages like usual, through your package manager. An example of a package is @rbxts/vide.

    If the package is not under the @rbxts scope, use pnpm scope / npm run scope to add the scope of the package.

    Here's an example of a package being used:

    import greet from "@snipcola/greet-test";
    greet("world");
    

Credits