forked from Vector35/binaryninja-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.atom-build.js
65 lines (62 loc) · 1.74 KB
/
.atom-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
child_process = require('child_process');
function run(result)
{
if (!result)
return;
if (process.platform == "darwin")
child_process.spawn("/usr/bin/open", ["build/html/index.html"])
else if (process.platform == "linux")
child_process.spawn("/usr/bin/xdg-open", ["build/html/index.html"])
else
child_process.spawn("start", ["build\\html\\index.html"])
}
if ((process.platform == "darwin") || (process.platform == "linux"))
{
matchStr = "(?<file>[\\/0-9a-zA-Z\\._]+):(?<line>\\d+):(?<col>\\d+):\\s+(?<message>.+)";
module.exports = {
cmd: "make html",
name: "build and show",
sh: true,
cwd: "{PROJECT_PATH}",
errorMatch: matchStr,
postBuild: run,
targets: {
"html": {
cmd: "make html",
sh: true,
cwd: "{PROJECT_PATH}",
errorMatch: matchStr,
},
"dummy": {
cmd: "make dummy",
sh: true,
cwd: "{PROJECT_PATH}"
}
}
};
}
else
{
matchStr = "(?<file>.+)\\((?<line>\\d+)\\): (?<message>.+)";
module.exports = {
cmd: "make.bat html",
name: "build and show",
sh: true,
cwd: "{PROJECT_PATH}",
errorMatch: matchStr,
postBuild: run,
targets: {
"html": {
cmd: "make.bat html",
sh: true,
cwd: "{PROJECT_PATH}",
errorMatch: matchStr,
},
"dummy": {
cmd: "make.bat dummy",
sh: true,
cwd: "{PROJECT_PATH}"
}
}
};
}