2021-10-10 11:02:25 +02:00
|
|
|
const { execSync } = require("child_process");
|
2021-10-07 18:21:01 +02:00
|
|
|
const path = require("path");
|
2021-10-10 11:02:25 +02:00
|
|
|
const fse = require("fs-extra");
|
2021-10-07 18:21:01 +02:00
|
|
|
|
2021-10-10 12:35:46 +02:00
|
|
|
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", "src"), path.join(__dirname, "..", "dist", "api", "src"));
|
|
|
|
fse.copySync(path.join(__dirname, "..", "..", "util", "src"), path.join(__dirname, "..", "dist", "util", "src"));
|
|
|
|
fse.copySync(path.join(__dirname, "..", "..", "cdn", "src"), path.join(__dirname, "..", "dist", "cdn", "src"));
|
|
|
|
fse.copySync(path.join(__dirname, "..", "..", "gateway", "src"), path.join(__dirname, "..", "dist", "gateway", "src"));
|
|
|
|
fse.copySync(path.join(__dirname, "..", "..", "bundle", "src"), path.join(__dirname, "..", "dist", "bundle", "src"));
|
2021-10-07 18:21:01 +02:00
|
|
|
|
2021-10-10 12:35:46 +02:00
|
|
|
console.log("Copying src files done");
|
|
|
|
console.log("Compiling src files ...");
|
2021-10-07 18:21:01 +02:00
|
|
|
|
2021-10-10 11:02:25 +02:00
|
|
|
console.log(
|
2021-10-10 12:35:46 +02:00
|
|
|
execSync(
|
|
|
|
"node " +
|
|
|
|
path.join(__dirname, "..", "node_modules", "typescript", "lib", "tsc.js") +
|
|
|
|
" -p " +
|
|
|
|
path.join(__dirname, ".."),
|
|
|
|
{
|
|
|
|
cwd: path.join(__dirname, ".."),
|
|
|
|
shell: true,
|
|
|
|
env: process.env,
|
|
|
|
encoding: "utf8",
|
|
|
|
}
|
|
|
|
)
|
2021-10-10 11:02:25 +02:00
|
|
|
);
|