diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-25 18:24:21 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-25 23:35:18 +1000 |
commit | f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052 (patch) | |
tree | a6655c41bb3db79c30fd876b06ee60fe9cf70c9b /scripts/install.js | |
parent | Allow edited_timestamp to passthrough in handleMessage (diff) | |
download | server-f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052.tar.xz |
Refactor to mono-repo + upgrade packages
Diffstat (limited to 'scripts/install.js')
-rw-r--r-- | scripts/install.js | 23 |
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" } +); |