// Renders mark.svg (the Graphley app icon) to the site's PNG icons.
// Run from the repository root: node tools/render-icons.js [out-dir-for-sibling-icons]
// Writes assets/icon.png (512, rounded), favicon.png (64, rounded), assets/apple-touch-icon.png
// (180, square; iOS rounds it). With an out dir it also writes graphley-96.png and graphley-144.png
//.
const fs = require('fs');
const path = require('path');
const { chromium } = require('playwright');
const root = path.resolve(__dirname, '..');
const svg = fs.readFileSync(path.join(root, 'mark.svg'), 'utf8');
const rounded = (size) => `
${svg.replace('
`;
const square = (size) => `${svg.replace('