// scripts/generate-pwa-screenshots.js const fs = require("fs"); const path = require("path"); const sharp = require("sharp"); const OUT_DIR = path.join(__dirname, "..", "public", "screenshots"); fs.mkdirSync(OUT_DIR, { recursive: true }); async function main() { // Desktop dashboard placeholder await sharp({ create: { width: 1280, height: 720, channels: 3, background: { r: 250, g: 248, b: 245 } } }) .composite([{ input: Buffer.from(` Route Commerce `), top: 0, left: 0, }]) .png() .toFile(path.join(OUT_DIR, "dashboard.png")); console.log("✓ dashboard.png"); // Mobile storefront placeholder await sharp({ create: { width: 390, height: 844, channels: 3, background: { r: 250, g: 248, b: 245 } } }) .composite([{ input: Buffer.from(` Route Commerce `), top: 0, left: 0, }]) .png() .toFile(path.join(OUT_DIR, "mobile-storefront.png")); console.log("✓ mobile-storefront.png"); } main().catch(console.error);