mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-21 17:05:22 +03:00
chore: copy monochrome files to public dev and staging folders
This commit is contained in:
parent
cd3a47c1af
commit
469ae72c78
7 changed files with 9 additions and 1 deletions
BIN
public-dev/monochrome-192x192.png
Normal file
BIN
public-dev/monochrome-192x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
public-dev/monochrome-512x512.png
Normal file
BIN
public-dev/monochrome-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
public-dev/monochrome-64x64.png
Normal file
BIN
public-dev/monochrome-64x64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 563 B |
BIN
public-staging/monochrome-192x192.png
Normal file
BIN
public-staging/monochrome-192x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
public-staging/monochrome-512x512.png
Normal file
BIN
public-staging/monochrome-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
public-staging/monochrome-64x64.png
Normal file
BIN
public-staging/monochrome-64x64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 563 B |
|
@ -1,4 +1,4 @@
|
||||||
import { rm, writeFile } from 'node:fs/promises'
|
import { copyFile, rm, writeFile } from 'node:fs/promises'
|
||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
import { resolve } from 'pathe'
|
import { resolve } from 'pathe'
|
||||||
import type { PngOptions, ResizeOptions } from 'sharp'
|
import type { PngOptions, ResizeOptions } from 'sharp'
|
||||||
|
@ -209,6 +209,14 @@ async function generatePWAIcons(folders: string[], icons: Icons) {
|
||||||
apple,
|
apple,
|
||||||
ico,
|
ico,
|
||||||
}, svgLogo, folders[0])
|
}, svgLogo, folders[0])
|
||||||
|
|
||||||
|
// copy monochrome png files to public dev and staging folders
|
||||||
|
await Promise.all(folders.slice(1).map(async (folder) => {
|
||||||
|
await Promise.all(transparent.sizes.map(size => copyFile(
|
||||||
|
resolve(folders[0], `monochrome-${size}x${size}.png`),
|
||||||
|
resolve(folder, `monochrome-${size}x${size}.png`),
|
||||||
|
)))
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Generating Elk PWA Icons...')
|
console.log('Generating Elk PWA Icons...')
|
||||||
|
|
Loading…
Reference in a new issue