mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-26 01:02:42 +00:00
18 lines
598 B
JavaScript
18 lines
598 B
JavaScript
const { exec, spawn } = require("child_process");
|
|
const { exitCode } = require("process");
|
|
|
|
let parts = "api,cdn,gateway,util,bundle".split(",");
|
|
parts.forEach(element => {
|
|
// exec(`npm --prefix ../${element} run build`, (error, stdout, stderr) => {
|
|
// if (error) {
|
|
// console.log(`error: ${error.message}`);
|
|
// return;
|
|
// }
|
|
// if (stderr) {
|
|
// console.log(`stderr: ${stderr}`);
|
|
// return;
|
|
// }
|
|
// console.log(`stdout: ${stdout}`);
|
|
// });
|
|
spawn("npm", ["run", "build"], {cwd: `../${element}`});
|
|
}); |