more clean

This commit is contained in:
Vendicated 2024-07-18 21:52:31 +02:00
parent 5797506569
commit 7148c29ed1
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -231,7 +231,11 @@ if (existsSync("dist/renderer.js")) {
await Promise.all(
readdirSync("dist")
.filter(f => ["patcher", "preload", "renderer", "main"].some(name => f.toLowerCase().includes(name)))
.filter(f =>
f.endsWith(".map") ||
f.endsWith(".LEGAL.txt") ||
["patcher", "preload", "renderer"].some(name => f.startsWith(name))
)
.map(file => rm(join("dist", file)))
);