Something went wrong. Try again.
A local-first note taking app
Something went wrong. Try again.
1234567891011121314151617181920212223import { execFileSync } from 'node:child_process';import { existsSync } from 'node:fs';import { join } from 'node:path';
export const repoRoot = join(__dirname, '..');
/** * `electron-forge package`, not a bare `vite build`, which lacks Forge's entry * points and defines. `E2E_SKIP_BUILD=1` reuses the last build. */export default function globalSetup(): void { if ( process.env.E2E_SKIP_BUILD === '1' && existsSync(join(repoRoot, '.vite/build/main.js')) ) { return; } execFileSync('npx', ['electron-forge', 'package'], { cwd: repoRoot, stdio: 'inherit', });}