raea run

Run a TypeScript program on the engine, headless, and print what it prints.

View as Markdown

raea run bundles a TypeScript file and runs it on the engine's own V8, with no window and no composition. If the file's default export is a function, it's called. What the program prints is the answer; a throw ends the run with exit code 1. It's how checks such as a room's checkLayout run, and it reaches the engine's native calls (solids, ECS worlds) the way a composition does.

Terminal
raea run checks/layout.ts
raea run bake.ts --timeout 600

Usage

Terminal
raea run SCRIPT.ts   (a TypeScript program on the engine, headless: its default export is called, what it prints is the answer; a check like a room's checkLayout; also: --timeout S)

Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.

Flags

FlagTakesWhat it does
--timeoutVALUEStop the program after this many seconds (120 by default).