Ind.ie is now Small Technology Foundation.
Commit 4fe49a38 authored by Stanley Shyiko's avatar Stanley Shyiko

Merge pull request #4 from bmcminn/master

Added cross-exec-file package to handle windows .cmd needs
parents 5f9e8422 fa53222d
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0electron-har" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0electron-har" %*
)
......@@ -11,11 +11,12 @@
"bin": "./bin/electron-har",
"main": "./src/index.js",
"dependencies": {
"yargs": "^3.31.0",
"json-stable-stringify": "^1.0.0",
"cross-exec-file": "^1.0.0",
"electron-prebuilt": "^0.35.4",
"json-stable-stringify": "^1.0.0",
"object-assign": "^4.0.1",
"tmp": "^0.0.28"
"tmp": "^0.0.28",
"yargs": "^3.31.0"
},
"devDependencies": {
"electron-packager": "^5.1.1",
......@@ -24,7 +25,12 @@
"semistandard": "^7.0.4"
},
"semistandard": {
"globals": ["chrome", "describe", "it", "before"]
"globals": [
"chrome",
"describe",
"it",
"before"
]
},
"scripts": {
"clean": "rm -rf build",
......
......@@ -2,6 +2,7 @@ var tmp = require('tmp');
var assign = require('object-assign');
var fs = require('fs');
var execFile = require('child_process').execFile;
var crossExecFile = require('cross-exec-file');
/**
* @param {string} url url (e.g. http://google.com)
......@@ -30,7 +31,7 @@ module.exports = function electronHAR(url, o, cb) {
user: o.user === Object(o.user) ?
o.user.name + ':' + o.user.password : o.user
});
execFile(
crossExecFile(
__dirname + '/../bin/electron-har',
[url].concat(Object.keys(oo).reduce(function (r, k) {
var v = oo[k];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment