A motion design toolkit for coding agents.
JavaScript
Resolve script paths with fileURLToPath so sims and review tools run on Windows.
7qvz-z733298994ff8
diff --git a/scripts/sheet.mjs b/scripts/sheet.mjsindex 9404ebb..5619cfa 100644--- a/scripts/sheet.mjs+++ b/scripts/sheet.mjs@@ -11,8 +11,9 @@import {execFileSync} from 'node:child_process';import fs from 'node:fs';import path from 'node:path';+import {fileURLToPath} from 'node:url';-const ROOT = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..');+const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');const argv = process.argv.slice(2);const opt = (name, fallback) => {const i = argv.indexOf(`--${name}`);diff --git a/scripts/wave.mjs b/scripts/wave.mjsindex f82d939..115f58b 100644--- a/scripts/wave.mjs+++ b/scripts/wave.mjs@@ -9,8 +9,9 @@import {execFileSync, spawnSync} from 'node:child_process';import fs from 'node:fs';import path from 'node:path';+import {fileURLToPath} from 'node:url';-const ROOT = path.resolve(path.dirname(new URL(import.meta.url).pathname), '..');+const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');const argv = process.argv.slice(2);const ti = argv.indexOf('--timeline');const timelinePath = path.resolve(ti === -1 ? path.join(ROOT, 'timeline.json') : argv.splice(ti, 2)[1]);diff --git a/sims/build.mjs b/sims/build.mjsindex 8317655..a2c3025 100644--- a/sims/build.mjs+++ b/sims/build.mjs@@ -8,8 +8,9 @@import * as esbuild from 'esbuild';import fs from 'node:fs';import path from 'node:path';+import {fileURLToPath} from 'node:url';-const HERE = path.dirname(new URL(import.meta.url).pathname);+const HERE = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(HERE, '..');const DIST = path.join(HERE, 'dist');fs.mkdirSync(DIST, {recursive: true});diff --git a/sims/capture.mjs b/sims/capture.mjsindex 3b77d0d..e7be4a8 100644--- a/sims/capture.mjs+++ b/sims/capture.mjs@@ -13,9 +13,10 @@import {spawn} from 'node:child_process';import fs from 'node:fs';import path from 'node:path';+import {fileURLToPath} from 'node:url';import {chromium} from 'playwright';-const HERE = path.dirname(new URL(import.meta.url).pathname);+const HERE = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(HERE, '..');const argv = process.argv.slice(2);const name = argv[0];