Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Run single .res file

$
0
0

Hello Gabriel,

Can you give more details about what you’re trying to achieve? There’s no built-in command to directly compile and execute rescript code but you can decompose this, run a command that’d compile a single file and then send it to your favorite execution environment, for example:

bsc -e 'Js.log("hello world!")' | node // prints: hello world!

But manipulating the compiler directly is definitely not handy, so I’d still recommend going the easier way of using the rescript or rewatch builder and point your execution environment to your compiled index file.

And yes, using ReScript to write a CLI can be very nice! Don’t hesitate if you have more questions!


Viewing all articles
Browse latest Browse all 2592

Trending Articles