-
Notifications
You must be signed in to change notification settings - Fork 35
Console Runner
There is a console runner provided from ReoScript v1.2. The script file could be executed by this shell runner program.
Download ReoScript binary library or build source file. Console runner could be find in the following path:
ReoScript\ReoScriptRunner\Bin\Debug
If you build ReoScript with Release configuration. The last folder should be 'Release'.
-
Open Notepad, write following code and save as file named "Sample.rs":
function hello() { console.log('Hello World!'); } hello();
-
In command prompt, execute following command:
C:\> ReoScript.exe Sample.rs
-
The 'Hello World!' will be printed out:
C:\> ReoScript.exe Sample.rs Hello World! C:\>
All Core Features will be supported if script executed from Console Runner. See more about CoreFeatures.
-
-debug: Enable debug support.
There is a object name 'debug' will be added into SRM. The debug object provides the following methods:
- debug.assert(boolean)
- debug.assert(result, expect)
- debug.Stopwatch
-
-exec: Run given script
Sample.rs:
function hello() { console.log('Hello World!'); }
Execute runner with -exec argument:
C:\> ReoScript.exe Sample.rs -exec "hello();" Hello World! C:\>