feat(pwa): add apple-touch-icon variants and favicon.ico
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 590 B |
@@ -31,6 +31,14 @@ async function main() {
|
|||||||
await sharp(svg).resize(96, 96).png().toFile(path.join(OUT_DIR, `${name}.png`));
|
await sharp(svg).resize(96, 96).png().toFile(path.join(OUT_DIR, `${name}.png`));
|
||||||
console.log(`✓ ${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); });
|
main().catch((err) => { console.error(err); process.exit(1); });
|
||||||
|
|||||||
Reference in New Issue
Block a user