// Repository-relative paths, so the checks run from the quest tree and from the public repository alike. import { existsSync } from 'fs'; export const ROOT = new URL('../', import.meta.url).pathname; export const PAGE = (p) => 'file://' + ROOT + 'src/' + p; // the hand-off files sit in src/handoff/ in the quest tree and at the repository root in the public copy export const HAND = (f) => existsSync(ROOT + 'src/handoff/' + f) ? ROOT + 'src/handoff/' + f : ROOT + f;