OR-1 dataflow CPU sketch
1import * as esbuild from "esbuild";
2
3const watch = process.argv.includes("--watch");
4
5const options = {
6 entryPoints: ["src/main.ts"],
7 bundle: true,
8 outfile: "dist/bundle.js",
9 format: "esm",
10 target: "es2020",
11 alias: {
12 "@common": "../../frontend-common/src",
13 },
14};
15
16if (watch) {
17 const ctx = await esbuild.context(options);
18 await ctx.watch();
19 console.log("Watching for changes...");
20} else {
21 await esbuild.build(options);
22}