-
Notifications
You must be signed in to change notification settings - Fork 28
/
macos.js
108 lines (107 loc) · 3.45 KB
/
macos.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
var path = require('path');
module.exports = {
chrome: {
pathQuery: 'mdfind \'kMDItemDisplayName == "Google Chrome" && kMDItemKind == Application\'',
plistPath: 'Contents/Info.plist',
command: 'open',
process: 'Google Chrome',
versionKey: 'KSVersion',
versionKey2: 'CFBundleShortVersionString',
defaultLocation: '/Applications/Google Chrome.app',
args: ['--args'],
opensTab: true
},
canary: {
pathQuery: 'mdfind \'kMDItemDisplayName == "Google Chrome Canary" && kMDItemKind == Application\'',
plistPath: 'Contents/Info.plist',
command: 'open',
process: 'Google Chrome Canary',
versionKey: 'KSVersion',
versionKey2: 'CFBundleShortVersionString',
defaultLocation: '/Applications/Google Chrome Canary.app',
args: ['--args'],
opensTab: true
},
chromium: {
pathQuery: 'mdfind \'kMDItemDisplayName == "Chromium" && kMDItemKind == Application\'',
plistPath: 'Contents/Info.plist',
command: 'open',
process: 'Chromium',
versionKey: 'KSVersion',
versionKey2: 'CFBundleShortVersionString',
defaultLocation: '/Applications/Chromium.app',
args: ['--args'],
opensTab: true
},
firefox: {
pathQuery: 'mdfind \'kMDItemDisplayName == "Firefox" && kMDItemKind == Application\'',
plistPath: 'Contents/Info.plist',
command: 'open',
process: 'firefox',
versionKey: 'CFBundleGetInfoString',
defaultLocation: '/Applications/Firefox.app',
args: ['--args'],
opensTab: true
},
aurora: {
pathQuery: 'mdfind \'kMDItemDisplayName == "FirefoxAurora" && kMDItemKind == Application\'',
plistPath: 'Contents/Info.plist',
command: 'open',
process: 'firefox',
versionKey: 'CFBundleGetInfoString',
defaultLocation: '/Applications/FirefoxAurora.app',
args: ['--args'],
opensTab: true
},
opera: {
pathQuery: 'mdfind \'kMDItemDisplayName == "Opera" && kMDItemKind == Application\'',
plistPath: 'Contents/Info.plist',
command: 'open',
process: 'Opera',
versionKey: 'CFBundleShortVersionString',
defaultLocation: '/Applications/Opera.app',
args: ['--args']
},
safari: {
pathQuery: 'mdfind \'kMDItemDisplayName == "Safari" && kMDItemKind == Application\'',
plistPath: 'Contents/version.plist',
command: 'open',
process: 'Safari',
versionKey: 'CFBundleShortVersionString',
defaultLocation: '/Applications/Safari.app',
opensTab: true
},
electron: {
pathQuery: 'which electron',
process: 'electron',
args: [path.join(__dirname, '..', '..', '..', 'resources', 'electron.js')],
defaultLocation: [
path.join(process.cwd(), 'node_modules', '.bin', 'electron'),
'/usr/local/bin/electron'
],
multi: true
},
phantom: {
pathQuery: 'which phantomjs',
process: 'phantomjs',
args: [path.join(__dirname, '..', '..', '..', 'resources', 'phantom.js')],
defaultLocation: [
path.join(process.cwd(), 'node_modules', '.bin', 'phantomjs'),
'/usr/local/bin/phantomjs'
],
multi: true
},
nodeWebkit: {
pathQuery: 'mdfind \'kMDItemDisplayName == "node-webkit" && kMDItemKind == Application\'',
command: 'open',
process: 'node-webkit',
versionKey: 'CFBundleShortVersionString',
defaultLocation: '/Applications/node-webkit.app',
args: ['--args' ],
getCommand: function(browser, url, args) {
args.push(process.cwd());
return browser.command + ' ' + args.join(' ') + ' --url="' + url + '"';
},
multi: true
}
};