forked from finos/perspective
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
33 lines (31 loc) · 1.07 KB
/
build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
const fs = require("fs");
require("dotenv").config({path: "./.perspectiverc"});
if (!fs.existsSync("./.perspectiverc")) {
console.error("No .perspectiverc, running setup");
process.env.PSP_BUILD_IMMEDIATELY = 1;
require("./setup");
} else if (process.env.PSP_PROJECT === "js") {
require("./build_js");
} else if (process.env.PSP_PROJECT === "python") {
require("./build_python");
} else if (process.env.PSP_PROJECT === "cpp") {
require("./build_cpp");
} else if (process.env.PSP_PROJECT === "") {
require("./build_js");
require("./build_python");
require("./build_cpp");
} else {
console.error(
`Invalid project "${process.env.PSP_PROJECT}" selected, running setup`
);
process.env.PSP_BUILD_IMMEDIATELY = 1;
require("./setup");
}