Claude Sonnet 5.5
build: --map-name, because Vercel refuses to serve *.map; the site's map is site.css.sourcemap
6c00f0c Download scripts/build-site-css.mjs from EHS-Studio/dssl: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/EHS-Studio/dssl/resolve/main/scripts/build-site-css.mjs
- Command line
-
hf download hf://EHS-Studio/dssl/scripts/build-site-css.mjs
-
curl -L -o build-site-css.mjs https://huggingface.co/EHS-Studio/dssl/resolve/main/scripts/build-site-css.mjs
1.35 kB
| /* build-site-css.mjs: compile the site's own stylesheets into public/site.css (+ site.css.map). | |
| * | |
| * The site is written in DSSL and the engine applies it in the browser. This also ships the same sheets as plain CSS, so | |
| * the page is styled on first paint, with JavaScript off, in a crawler, and in server-rendered HTML, which is exactly what | |
| * `dssl build` is for. The engine then adds what a build cannot keep (tilt, aura, animation, bend and stretch...). | |
| * Runs before `next build` (see package.json). */ | |
| import { spawnSync } from 'node:child_process'; | |
| import { mkdirSync } from 'node:fs'; | |
| import path from 'node:path'; | |
| import { fileURLToPath } from 'node:url'; | |
| const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); | |
| const SHEETS = ['tokens', 'site', 'home', 'docs', 'playground', 'changelog', 'bench']; // the order the page loads them in | |
| mkdirSync(path.join(root, 'public'), { recursive: true }); | |
| const r = spawnSync(process.execPath, ['--no-warnings', path.join(root, 'cli/dssl.mjs'), 'build', ...SHEETS.map((s) => path.join('public/styles', s + '.dssl')), '-o', 'public/site.css', '--reset', '--sourcemap', '--map-name', 'site.css.sourcemap', '--no-banner'], { cwd: root, encoding: 'utf8' }); | |
| process.stdout.write(r.stdout); process.stderr.write(r.stderr); | |
| process.exit(r.status || 0); | |