RbxRefresh - Use external editors for ROBLOX Development

Written by @Osyris, @spotco, and @badcc

18 Likes

Is there a reason for this over rSync?

RbxSync by evaera is also a great option for third party editor support.

The key difference here is how you use it.

The primary use case with RbxSync is opening a single file in the external editor and then moving back to ROBLOX.

RbxRefresh syncs a local file structure into ROBLOX Studio. Primarily, it’s meant to work in the opposite direction of RbxSync.
Also, we do have a reverse sync option (-s flag) to create the structure from an existing roblox project.

Why do people prefer using external scripting editors?

Makes working in studio easier since you can have your viewport:

In other news: I know where to go to reload my Nerf gun now…

5 Likes

It was like that when I got there.

2 Likes

Works nicely! Need to make it ignore file changes in the .git directory though. :wink:

it should only pick up .lua files so hasn’t been necessary

I’m aware, just having quite a bit of output spam from it right now. (Although this is the initial commit, so it might just be because of that) - Restarted it, got rid of that problem.

The recommended file structure is this:

ProjectFolder
    .git
    src
        StarterPlayer
            StarterPlayerScripts
                Client.LocalScript.lua
        ServerScriptService
            Server.Script.lua
        ReplicatedStorage
            Modules
                MyModule.ModuleScript.lua

where you run RbxRefresh as
rbxrefresh ProjectFolder/src

2 Likes

:thinking:

5 Likes

Apparently RbxRefresh does not work with “Bash for Windows” due to it not supporting file watching.

¯\_(ツ)_/¯

Should work perfectly fine with cmd.exe on Windows or Terminal for macOS.

2 Likes

What happens when you edit a file in the project folder while Studio is closed?

RbxRefresh does a full sync on first connect. Every sync after that is per file (for performance reasons).

1 Like

Seems useful.

I had to comment out line 223 in index.js to get it to run

http.get(“http://localhost:8888?kill=true").on("error”, (e) => {});

was throwing an error with unexpected symbol at ‘=>’

Will it not sync script files in Workplace? The -s option doesn’t reap script from workplace…

Sounds like you’re running an older version of NodeJS that doesn’t support lambda syntax.
The latest version shouldn’t have that issue. Try rerunning npm install -g rbxrefresh

This was an oversight. We have to whitelist service-level objects. I’ll add it in.

1 Like

Ah yes, there was an older version of Node.js higher in the execution path. Shame on me.

Cool, thanks!

You can pop out scripts using Studio onto other monitors by just dragging them over?

Yes. It’s not what I’m doing there, though. I’m using Sublime Text 3 + rSync to make everything save between my editor and my roblox studio place file.

1 Like