2023-10-05 11:13:19 +01:00
|
|
|
import { readdirSync, rmSync, readFileSync } from "fs";
|
2023-09-10 12:59:22 +01:00
|
|
|
|
|
|
|
const libFiles = readdirSync("./build");
|
|
|
|
|
2023-10-05 11:13:19 +01:00
|
|
|
const mangled = readFileSync("./build/.MANGLED").toString() === "false";
|
|
|
|
|
2023-09-10 12:59:22 +01:00
|
|
|
for (const file of libFiles) {
|
2023-10-05 11:13:19 +01:00
|
|
|
if (!file.startsWith(mangled ? "Binato.min.js" : "Binato.js")) {
|
2023-09-10 12:59:22 +01:00
|
|
|
rmSync(`./build/${file}`, { recursive: true });
|
|
|
|
}
|
2023-10-05 11:13:19 +01:00
|
|
|
}
|