Initial commit: Sproutlink short URL system

This commit is contained in:
2026-06-18 20:08:22 +08:00
commit 45875e9feb
40 changed files with 11485 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
/**
* Regenerate PWA icons from public/logo.png (run after logo change).
* node scripts/gen-pwa-icons.mjs
*/
import sharp from 'sharp';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __dirname = dirname(fileURLToPath(import.meta.url));
const pub = join(__dirname, '..', 'public');
const src = join(pub, 'logo.png');
await sharp(src)
.resize(192, 192, { fit: 'cover', position: 'center' })
.png()
.toFile(join(pub, 'pwa-192x192.png'));
await sharp(src)
.resize(512, 512, { fit: 'cover', position: 'center' })
.png()
.toFile(join(pub, 'pwa-512x512.png'));
console.log('Wrote public/pwa-192x192.png, public/pwa-512x512.png');