10 lines
337 B
JavaScript
10 lines
337 B
JavaScript
|
|
import sharp from 'sharp'
|
||
|
|
import { readFileSync } from 'node:fs'
|
||
|
|
|
||
|
|
const files = ['icon-only', 'icon-foreground', 'icon-background']
|
||
|
|
for (const f of files) {
|
||
|
|
const svg = readFileSync(`assets/${f}.svg`)
|
||
|
|
await sharp(svg, { density: 384 }).resize(1024, 1024).png().toFile(`assets/${f}.png`)
|
||
|
|
console.log('wrote assets/' + f + '.png')
|
||
|
|
}
|