Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

591 B
Raw Blame
// Compiles an EDIT.playtest.ts (sdk/raea/src/playtest.ts DSL) into the check-pack JSON void's checks.rs reads.
//   bun sdk/react/bench/playtest/compile.ts EDIT.playtest.ts [-o PACK.json]
import fs from "node:fs";
import { loadModule } from "./load";
import { compile, type PlaytestSpec } from "raea/playtest";

const file = process.argv[2];
const o = process.argv.indexOf("-o");
const spec: PlaytestSpec = (await loadModule(file)).default;
const json = JSON.stringify(compile(spec), null, 1) + "\n";
if (o > 0) fs.writeFileSync(process.argv[o + 1], json);
else process.stdout.write(json);