summary refs log tree commit diff
path: root/scripts/install.js
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-25 18:24:21 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-25 23:35:18 +1000
commitf44f5d7ac2d24ff836c2e1d4b2fa58da04b13052 (patch)
treea6655c41bb3db79c30fd876b06ee60fe9cf70c9b /scripts/install.js
parentAllow edited_timestamp to passthrough in handleMessage (diff)
downloadserver-f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052.tar.xz
Refactor to mono-repo + upgrade packages
Diffstat (limited to 'scripts/install.js')
-rw-r--r--scripts/install.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/install.js b/scripts/install.js
new file mode 100644
index 00000000..db9dadbc
--- /dev/null
+++ b/scripts/install.js
@@ -0,0 +1,23 @@
+const path = require("path");
+const fs = require("fs");
+const parts = ["api", "util", "cdn", "gateway"];
+
+const bundle = require("../package.json");
+
+for (const part of parts) {
+	const { devDependencies, dependencies } = require(path.join(
+		"..",
+		"..",
+		part,
+		"package.json"
+	));
+	bundle.devDependencies = { ...bundle.devDependencies, ...devDependencies };
+	bundle.dependencies = { ...bundle.dependencies, ...dependencies };
+	delete bundle.dependencies["@fosscord/util"];
+}
+
+fs.writeFileSync(
+	path.join(__dirname, "..", "package.json"),
+	JSON.stringify(bundle, null, "\t"),
+	{ encoding: "utf8" }
+);