#!/bin/sh # Renders the PWA icons from the SVG sources with headless Chromium (Playwright image). # Usage (from frontend/): sh scripts/render-icons.sh set -eu IMAGE=mcr.microsoft.com/playwright:v1.63.0-noble CHROME=/ms-playwright/chromium_headless_shell-1243/chrome-headless-shell-linux64/chrome-headless-shell render() { # docker run --rm -v "$PWD/public/icons:/icons" "$IMAGE" "$CHROME" \ --no-sandbox --hide-scrollbars --default-background-color=00000000 \ --window-size="$2,$2" --screenshot="/icons/$3" "file:///icons/$1" >/dev/null 2>&1 } render icon.svg 192 icon-192.png render icon.svg 512 icon-512.png render icon-maskable.svg 512 icon-maskable-512.png render icon-maskable.svg 180 apple-touch-icon.png echo "Icons rendered into public/icons/"