Closed anhnhoktvn closed 4 years ago
In browser or in a server side script?
The LiveScript programmatic API is documented here (scroll past the CLI sections). In Node.js or in the browser, it's pretty easy to build a simple REPL from that API, and this is what the livescript.net website does.
The REPL that you get when you run lsc
is not publicly exposed; its implementation is coupled to the Node.js REPL module and several other bits of Node.js functionality, and its interface is not stable. You can technically figure out how to run it in Node.js by reading the LiveScript code, but I wouldn't advise it. You probably can't run it in the browser, at least without doing some fussy module shimming.
How do I start new REPL session by code during runtime?