aboutsummaryrefslogtreecommitdiff
path: root/build.mjs
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-08-29 02:25:27 +0200
committerVendicated <vendicated@riseup.net>2022-08-29 02:25:27 +0200
commitaf498e78291b67377aaf876c84143cdfe7c8b308 (patch)
tree091f03c5a78823de12ddd1f4ab60e2fe0ddb4803 /build.mjs
downloadVencord-af498e78291b67377aaf876c84143cdfe7c8b308.tar.gz
Vencord-af498e78291b67377aaf876c84143cdfe7c8b308.tar.bz2
Vencord-af498e78291b67377aaf876c84143cdfe7c8b308.zip
Rewrite
Diffstat (limited to 'build.mjs')
-rwxr-xr-xbuild.mjs31
1 files changed, 31 insertions, 0 deletions
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