-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
48 lines (39 loc) · 917 Bytes
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const execSync = require("child_process").execSync;
const join = require("path").join;
execSync("npm i", {
windowsHide: true,
cwd: join(__dirname, "./data"),
stdio: "inherit",
env: {
...process.env,
NODE_ENV: process.argv[2] || "development",
},
});
console.log("done installing modules");
execSync("npx webpack", {
windowsHide: true,
cwd: join(__dirname, "./data"),
stdio: "inherit",
env: {
...process.env,
NODE_ENV: process.argv[2] || "development",
},
});
console.log("webpack build done");
execSync("go get", {
windowsHide: true,
cwd: __dirname,
stdio: "inherit",
});
execSync('go-bindata-assetfs -prefix "data/" data/dist/...', {
windowsHide: true,
cwd: __dirname,
stdio: "inherit",
});
console.log("bindata done");
execSync('go build -ldflags="-H windowsgui"', {
windowsHide: true,
cwd: __dirname,
stdio: "inherit",
});
console.log("build done");