Skip to content

Commit

Permalink
Merge pull request #34 from ekryski/node-webkit-windows
Browse files Browse the repository at this point in the history
Node webkit support for Windows
  • Loading branch information
daffl committed Nov 4, 2014
2 parents 172aad0 + e1ea514 commit fd0f7ce
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/local/platform/macos.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ module.exports = {
args: ['--args' ],
getCommand: function(browser, url, args) {
return browser.command + ' ' + args.join(' ') + ' --url="' + url + '"';
}
},
multi: true
}
};
12 changes: 11 additions & 1 deletion lib/local/platform/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ module.exports = {
defaultLocation: path.join(programFiles, 'Opera', 'launcher.exe'),
pathQuery: 'dir /s /b opera.exe',
cwd: cwd,
imageName: 'opera.exe'
imageName: 'opera.exe',
opensTab: true
},
ie: {
defaultLocation: path.join(programFiles, 'Internet Explorer', 'iexplore.exe'),
Expand All @@ -40,5 +41,14 @@ module.exports = {
args: [path.join(__dirname, '..', '..', '..', 'resources/phantom.js')],
multi: true,
cwd: cwd
},
nodeWebkit: {
pathQuery: 'dir /s /b nw.exe',
multi: true,
cwd: cwd,
imageName: 'nw.exe',
getCommand: function(browser, url) {
return '"' + browser.command + '" --url="' + url + '"';
}
}
};
3 changes: 1 addition & 2 deletions lib/local/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ module.exports = function(browser) {
// ShowVer.exe returns a non zero status code even if it works
if (typeof stdout === 'string' && regex.test(stdout)) {
browser.version = stdout.match(regex)[1];
return deferred.resolve(browser);
}

deferred.reject(error);
return deferred.resolve(browser);
});

return deferred.promise;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"node": "~0.10"
},
"scripts": {
"test": "grunt test"
"test": "grunt test --stack"
},
"devDependencies": {
"mocha": "~1.6.0",
Expand Down

0 comments on commit fd0f7ce

Please sign in to comment.