11 lines
No EOL
322 B
TypeScript
11 lines
No EOL
322 B
TypeScript
import { readdirSync, rmSync, readFileSync } from "fs";
|
|
|
|
const libFiles = readdirSync("./build");
|
|
|
|
const mangled = readFileSync("./build/.MANGLED").toString() === "false";
|
|
|
|
for (const file of libFiles) {
|
|
if (!file.startsWith(mangled ? "index.min.js" : "index.js")) {
|
|
rmSync(`./build/${file}`, { recursive: true });
|
|
}
|
|
} |