diff --git a/package-lock.json b/package-lock.json index 446b14b..a98346a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "devDependencies": { "@types/node": "^20.6.0", "@types/node-fetch": "^2.6.4", + "@vercel/ncc": "^0.38.0", "check-outdated": "^2.12.0", "nodemon": "^3.0.1", "npm-run-all": "^4.1.5", @@ -228,6 +229,15 @@ "form-data": "^3.0.0" } }, + "node_modules/@vercel/ncc": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.0.tgz", + "integrity": "sha512-B4YKZMm/EqMptKSFyAq4q2SlgJe+VCmEH6Y8gf/E1pTlWbsUJpuH1ymik2Ex3aYO5mCWwV1kaSYHSQOT8+4vHA==", + "dev": true, + "bin": { + "ncc": "dist/ncc/cli.js" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", diff --git a/package.json b/package.json index b527a95..ee27f73 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "dev:updateCheck": "check-outdated", "dev:run": "nodemon --watch './**/*.ts' Binato.ts", "build": "npm-run-all build:*", - "build:smash": "ts-node ./tooling/fileSmasher.ts", - "build:build": "tsc --build", + "build:build": "ncc build Binato.ts -o build", "build:mangle": "ts-node ./tooling/mangle.ts", "build:cleanup": "ts-node ./tooling/cleanup.ts", "_clean": "tsc --build --clean" @@ -28,6 +27,7 @@ "devDependencies": { "@types/node": "^20.6.0", "@types/node-fetch": "^2.6.4", + "@vercel/ncc": "^0.38.0", "check-outdated": "^2.12.0", "nodemon": "^3.0.1", "npm-run-all": "^4.1.5", diff --git a/tooling/mangle.ts b/tooling/mangle.ts index 14f8580..be6c475 100644 --- a/tooling/mangle.ts +++ b/tooling/mangle.ts @@ -5,11 +5,11 @@ const DISABLE = false; writeFileSync("./build/.MANGLED", `${DISABLE}`); if (DISABLE) { - writeFileSync("./build/Binato.js", readFileSync("./build/combined.js")); + writeFileSync("./build/Binato.js", readFileSync("./build/index.js")); console.warn("[WARNING] mangle.ts is disabled!"); } else { (async () => { - const mangled = await minify(readFileSync("./build/combined.js").toString(), { + const mangled = await minify(readFileSync("./build/index.js").toString(), { mangle: true, toplevel: true, });