Files
LinkPort/scripts/project-paths.mjs
曾志威 8f27223fce fix(scripts): use project-relative paths and portable toolchains
Remove fixed machine installation paths, prefer project-local Go and Node toolchains, and resolve build verification and browser test binary paths relative to the project. Add isolated discovery/relocation tests and document compatibility and validation boundaries.

Validation: 20 tool-discovery assertions, 3 Node path tests, startup isolation and script syntax checks passed. Frontend build passed; full Go compilation was blocked by unrelated concurrent Kubernetes changes.
2026-09-22 14:24:47 +08:00

6 lines
242 B
JavaScript

import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
export const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
export const resolveProjectPath = path => resolve(projectRoot, path);