feat(pwa): add apple-touch-icon variants and favicon.ico
This commit is contained in:
@@ -31,6 +31,14 @@ async function main() {
|
||||
await sharp(svg).resize(96, 96).png().toFile(path.join(OUT_DIR, `${name}.png`));
|
||||
console.log(`✓ ${name}.png`);
|
||||
}
|
||||
// Apple touch icons
|
||||
for (const [name, size] of [["apple-touch-icon", 180], ["apple-touch-icon-167", 167], ["apple-touch-icon-152", 152]]) {
|
||||
await sharp(svg).resize(size, size).png().toFile(path.join(__dirname, "..", "public", `${name}.png`));
|
||||
console.log(`✓ ${name}.png`);
|
||||
}
|
||||
// favicon.ico (32x32)
|
||||
await sharp(svg).resize(32, 32).png().toFile(path.join(__dirname, "..", "public", "favicon.ico"));
|
||||
console.log("✓ favicon.ico");
|
||||
}
|
||||
|
||||
main().catch((err) => { console.error(err); process.exit(1); });
|
||||
|
||||
Reference in New Issue
Block a user