Fix CI
This commit is contained in:
parent
30569c06ab
commit
ad240d3598
3 changed files with 4 additions and 4 deletions
|
@ -3,10 +3,10 @@ import { readdirSync, rmSync, renameSync } from "fs";
|
||||||
const libFiles = readdirSync("./build");
|
const libFiles = readdirSync("./build");
|
||||||
|
|
||||||
for (const file of libFiles) {
|
for (const file of libFiles) {
|
||||||
if (!file.startsWith("combined")) {
|
if (!file.startsWith("index.min.js")) {
|
||||||
rmSync(`./build/${file}`, { recursive: true });
|
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");
|
//renameSync("./build/combined.d.ts", "./build/index.d.ts");
|
|
@ -23,7 +23,7 @@ function readDir(nam:string) {
|
||||||
} else if (file.endsWith(".ts")) {
|
} else if (file.endsWith(".ts")) {
|
||||||
if (file == "index.ts") {
|
if (file == "index.ts") {
|
||||||
tsLastFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
|
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());
|
tsFirstFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
|
||||||
} else {
|
} else {
|
||||||
tsEverythingElse.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
|
tsEverythingElse.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { readFileSync, writeFileSync } from "fs";
|
||||||
import { minify } from "terser";
|
import { minify } from "terser";
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const mangled = await minify(readFileSync("./build/index.js").toString(), {
|
const mangled = await minify(readFileSync("./build/combined.js").toString(), {
|
||||||
mangle: true,
|
mangle: true,
|
||||||
toplevel: true,
|
toplevel: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue