summary refs log tree commit diff
path: root/bundle/src/build.js
blob: b893d5eeea75c78acda510788449d1d48f05f14b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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}`});
});