chore: remove unused background assets [no ci]

This commit is contained in:
2026-07-02 20:18:09 +07:00 Unverified
parent 113626cf45
commit 49c806bf2d
12 changed files with 5 additions and 3 deletions
+5 -3
View File
@@ -1,12 +1,14 @@
import { Glob } from "bun";
import { file, Glob, write } from "bun";
import { rm } from "node:fs/promises";
const g = new Glob("public/bgassets/*.png");
for await (const img of g.scan()) {
Bun.file(img)
file(img)
.image()
.webp()
.buffer()
.then((b) => Bun.write(img.replace(".png", ".webp"), b))
.then((b) => write(img.replace(".png", ".webp"), b))
.then(() => rm(img))
.finally(() => console.log(img, "processed."));
}