mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 18:18:15 +00:00
prettier formatted /bundle
This commit is contained in:
+20
-4
@@ -18,15 +18,24 @@ if (argv.includes("clean")) {
|
||||
});
|
||||
}
|
||||
|
||||
fse.copySync(path.join(__dirname, "..", "..", "api", "assets"), path.join(__dirname, "..", "dist", "api", "assets"));
|
||||
fse.copySync(
|
||||
path.join(__dirname, "..", "..", "api", "assets"),
|
||||
path.join(__dirname, "..", "dist", "api", "assets")
|
||||
);
|
||||
fse.copySync(
|
||||
path.join(__dirname, "..", "..", "api", "client_test"),
|
||||
path.join(__dirname, "..", "dist", "api", "client_test")
|
||||
);
|
||||
fse.copySync(path.join(__dirname, "..", "..", "api", "locales"), path.join(__dirname, "..", "dist", "api", "locales"));
|
||||
fse.copySync(
|
||||
path.join(__dirname, "..", "..", "api", "locales"),
|
||||
path.join(__dirname, "..", "dist", "api", "locales")
|
||||
);
|
||||
dirs.forEach((a) => {
|
||||
fse.copySync("../" + a + "/src", "dist/" + a + "/src");
|
||||
if (verbose) console.log(`Copied ${"../" + a + "/dist"} -> ${"dist/" + a + "/src"}!`);
|
||||
if (verbose)
|
||||
console.log(
|
||||
`Copied ${"../" + a + "/dist"} -> ${"dist/" + a + "/src"}!`
|
||||
);
|
||||
});
|
||||
|
||||
console.log("Copying src files done");
|
||||
@@ -35,7 +44,14 @@ console.log("Compiling src files ...");
|
||||
console.log(
|
||||
execSync(
|
||||
'node "' +
|
||||
path.join(__dirname, "..", "node_modules", "typescript", "lib", "tsc.js") +
|
||||
path.join(
|
||||
__dirname,
|
||||
"..",
|
||||
"node_modules",
|
||||
"typescript",
|
||||
"lib",
|
||||
"tsc.js"
|
||||
) +
|
||||
'" -p "' +
|
||||
path.join(__dirname, "..") +
|
||||
'"',
|
||||
|
||||
@@ -5,10 +5,19 @@ 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"));
|
||||
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" });
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, "..", "package.json"),
|
||||
JSON.stringify(bundle, null, "\t"),
|
||||
{ encoding: "utf8" }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user