From af498e78291b67377aaf876c84143cdfe7c8b308 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Mon, 29 Aug 2022 02:25:27 +0200 Subject: Rewrite --- build.mjs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 build.mjs (limited to 'build.mjs') diff --git a/build.mjs b/build.mjs new file mode 100755 index 0000000..f74cf69 --- /dev/null +++ b/build.mjs @@ -0,0 +1,31 @@ +#!/usr/bin/node +import esbuild from "esbuild"; + +await Promise.all([ + esbuild.build({ + entryPoints: ["src/preload.ts"], + outfile: "dist/preload.js", + format: "cjs", + treeShaking: true, + platform: "node", + target: ["esnext"] + }), + esbuild.build({ + entryPoints: ["src/patcher.ts"], + outfile: "dist/patcher.js", + format: "cjs", + target: ["esnext"], + platform: "node" + }), + esbuild.build({ + entryPoints: ["src/Vencord.ts"], + outfile: "dist/renderer.js", + format: "iife", + bundle: true, + target: ["esnext"], + footer: { js: "//# sourceURL=VencordRenderer" }, + globalName: "Vencord" + }) +]); + +console.log("Built!"); \ No newline at end of file -- cgit