rojo-rbx / run-in-roblox

Run a place, model, or individual script inside Roblox Studio, integrating with command line tools
MIT License
53 stars 22 forks source link

Implement place runner and script runner #2

Closed jeparlefrancais closed 5 years ago

jeparlefrancais commented 5 years ago

So this is my first rust pull request! So let me know if you see anything non-standard/bad-practice or just even something weird.

I added a few things to the CLI:

// open a place and run a lua file in that place
run-in-roblox place.rbxlx --script bootstrap.lua

// open a place and execute some lua code
run-in-roblox place.rbxlx --execute "require(game:GetService('ServerStorage').Main)"

// open an empty place and run a lua file
run-in-roblox main.lua

The last command will panic if you pass --script or --execute. About that, should I really just panic! in main.rs? Or is there a better way to exit with an error message?

I added the colored create in order to be able to output with similar colors as in roblox studio output window.

LPGhatguy commented 5 years ago

I'm super late, but this is definitely good enough to replace what's in master now!