squiggle/packages/squiggle-lang/scripts/run.mjs

20 lines
369 B
JavaScript
Raw Permalink Normal View History

#!/usr/bin/env node
2022-09-19 20:55:32 +00:00
import { run } from "./lib.mjs";
import { Command } from "commander";
const program = new Command();
program.arguments("<string>");
const options = program.parse(process.argv);
const src = program.args[0];
if (!src) {
throw new Error("Expected src");
}
2022-09-20 16:54:26 +00:00
const sampleCount = process.env.SAMPLE_COUNT;
run(src, { output: true, sampleCount });