// Shared path + dependency resolution for the deck projection. // // postcss and playwright-chromium are devDependencies of outreach/presentation/ (they // are Slidev's neighbours, and Slidev is what we drive). Resolve them from there // explicitly: pnpm is strict, so nothing is hoisted to a top-level node_modules. import { createRequire } from 'node:module' import { fileURLToPath } from 'node:url' import { dirname, resolve } from 'node:path' const HERE = dirname(fileURLToPath(import.meta.url)) // outreach/scripts/decks/lib export const OUTREACH = resolve(HERE, '../../..') // outreach/ export const PRESENTATION = resolve(OUTREACH, 'presentation') export const SITE = resolve(OUTREACH, 'site/site') // content/ + public/ live here export const DIST = resolve(PRESENTATION, 'dist') const require_ = createRequire(resolve(PRESENTATION, 'package.json')) export const postcss = require_('postcss') export const { chromium } = require_('playwright-chromium') export const publicBase = (id) => `/images/decks/${id}` export const publicDir = (id) => resolve(SITE, `public/images/decks/${id}`) export const contentFile = (lang, id) => resolve(SITE, `content/resources/${lang}/decks/${id}.md`)