summary refs log tree commit diff
path: root/bundle/scripts/install.js
blob: db9dadbc6e65289a63ec74ab6f8270d6cc7fb6ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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" }
);