This commit is contained in:
Holly Stubbs 2023-08-20 02:17:39 +01:00
parent 30569c06ab
commit ad240d3598
Signed by: tgpholly
GPG Key ID: B8583C4B7D18119E
3 changed files with 4 additions and 4 deletions

View File

@ -3,10 +3,10 @@ import { readdirSync, rmSync, renameSync } from "fs";
const libFiles = readdirSync("./build");
for (const file of libFiles) {
if (!file.startsWith("combined")) {
if (!file.startsWith("index.min.js")) {
rmSync(`./build/${file}`, { recursive: true });
}
}
renameSync("./build/combined.js", "./build/index.js");
//renameSync("./build/combined.js", "./build/index.js");
//renameSync("./build/combined.d.ts", "./build/index.d.ts");

View File

@ -23,7 +23,7 @@ function readDir(nam:string) {
} else if (file.endsWith(".ts")) {
if (file == "index.ts") {
tsLastFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
} else if (nam.includes("enum")) {
} else if (nam.includes("enum") || file.includes("Behaviour")) {
tsFirstFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
} else {
tsEverythingElse.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());

View File

@ -2,7 +2,7 @@ import { readFileSync, writeFileSync } from "fs";
import { minify } from "terser";
(async () => {
const mangled = await minify(readFileSync("./build/index.js").toString(), {
const mangled = await minify(readFileSync("./build/combined.js").toString(), {
mangle: true,
toplevel: true,
});