#!/usr/bin/env node // Builds the site into dist/. Today the site is one hand-written page, so the build is a clean copy // of public/. dist/ is what every deploy sends, so a later static-site generator only has to keep // writing its output there. import { cpSync, rmSync } from 'node:fs'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; const root = join(dirname(fileURLToPath(import.meta.url)), '..'); const dist = join(root, 'dist'); rmSync(dist, { recursive: true, force: true }); cpSync(join(root, 'public'), dist, { recursive: true }); console.log('built dist/');