ssn-installer/build.js

22 lines
458 B
JavaScript
Raw Normal View History

2019-07-22 22:29:02 +02:00
const childProcess = require("child_process");
const os = require("os");
function puts(error, stdout, stderr) {
if (error) {
throw error;
}
console.log(stdout);
console.error(stderr);
}
switch (os.type()) {
case "Linux":
childProcess.exec("npm run build-linux", puts);
break;
case "Windows_NT":
childProcess.exec("npm run build-windows", puts);
break;
default:
throw new Error("Unsupported OS found: " + os.type());
}