import sharp from 'sharp' import toIco from 'to-ico' import { readFileSync, writeFileSync } from 'node:fs' import { fileURLToPath } from 'node:url' import { dirname, join } from 'node:path' const root = join(dirname(fileURLToPath(import.meta.url)), '..') const pub = join(root, 'public') const svg = readFileSync(join(pub, 'favicon.svg')) // favicon.ico (16/32/48) const pngs = await Promise.all( [16, 32, 48].map((s) => sharp(svg, { density: 384 }).resize(s, s).png().toBuffer()), ) writeFileSync(join(pub, 'favicon.ico'), await toIco(pngs)) // apple touch + pwa icon await sharp(svg, { density: 512 }).resize(180, 180).png().toFile(join(pub, 'apple-touch-icon.png')) await sharp(svg, { density: 512 }).resize(512, 512).png().toFile(join(pub, 'icon-512.png')) // social card (og:image) — Quant Agent (wireframe globe) const globe = (cx, cy, r, sw) => ` ` const og = ` ${Array.from({ length: 12 }, (_, i) => ``).join('')} ${Array.from({ length: 7 }, (_, i) => ``).join('')} ${globe(955, 315, 210, 5)} ${globe(0, 0, 19, 2.6)} Quant Agent Four agents argue. One verdict. A multi-agent quant terminal for Hyperliquid perps — live data, TA, LONG / SHORT / SKIP. LIVE · HYPERLIQUID PAPER · DRY-RUN ` await sharp(Buffer.from(og)).png().toFile(join(pub, 'og.png')) console.log('✓ icons + og generated')