This repository was archived by the owner on Aug 2, 2024. It is now read-only.
forked from proudparrot2/bnkr-pro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprod.js
More file actions
55 lines (55 loc) · 1.31 KB
/
prod.js
File metadata and controls
55 lines (55 loc) · 1.31 KB
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
49
50
51
52
53
54
55
//i will PROD you with a stick
let targets = [
{
"outputFile": "base.html"
},
{
"outputFile": "base.htm",
},
{
"outputFile": "cheatless.html",
"disabledModules": [
"/cheat/"
],
"buildModifier": "cheatless"
},
{
"outputFile": "cheatless.htm",
"disabledModules": [
"/cheat/"
],
"buildModifier": "cheatless"
},
{
"outputFile": "gameless.html",
"disabledModules": [
"/game.html"
],
"buildModifier": "gameless"
},
{
"outputFile": "gameless.htm",
"disabledModules": [
"/game.html"
],
"buildModifier": "gameless"
}
];
const fs = require("fs");
const exec = require('child_process').execSync;
let bc = require("./config");
for(let i in targets){
let tc = targets[i];
let tbc = bc;
for(let i in tc){
tbc[i]=tc[i];
}
fs.writeFileSync(__dirname+"/tmpconf.js", `module.exports = ${JSON.stringify(tbc)}`);
console.log("doing "+tbc.buildModifier);
let out = exec('node build.js src dist syscall '+targets[i].name, { encoding: 'utf-8' });
if(process.argv[2] == "v"){
console.log(out);
} else {
console.log(out.split("\n")[out.split("\n").length-2]);
}
}