fix: icônes PNG + fetch handler pour déclencher le prompt PWA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-14 17:29:10 -04:00
parent ad0dc92f89
commit 8114103117
8 changed files with 584 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
// Génère icon-192.png et icon-512.png depuis icon.svg
import sharp from 'sharp';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
const __dirname = dirname(fileURLToPath(import.meta.url));
const svgPath = resolve(__dirname, '../public/icon.svg');
const svg = readFileSync(svgPath);
for (const size of [192, 512]) {
await sharp(svg)
.resize(size, size)
.png()
.toFile(resolve(__dirname, `../public/icon-${size}.png`));
console.log(`icon-${size}.png generated`);
}