18 lines
645 B
JavaScript
18 lines
645 B
JavaScript
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const root = path.join(__dirname, '..');
|
|
const iconsDir = path.join(root, 'static', 'icons');
|
|
const minimalPng = Buffer.from(
|
|
'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAKmrrdAAAAABJRU5ErkJggg==',
|
|
'base64'
|
|
);
|
|
|
|
fs.mkdirSync(iconsDir, { recursive: true });
|
|
for (const name of ['icon-192.png', 'icon-512.png', 'maskable-512.png']) {
|
|
fs.writeFileSync(path.join(iconsDir, name), minimalPng);
|
|
}
|
|
console.log('Wrote placeholder PNG icons to static/icons/');
|