gulp-jasmine-phantom
Advanced tools
Comparing version 1.3.2 to 1.3.3
21
index.js
@@ -21,3 +21,4 @@ 'use strict'; | ||
**/ | ||
var gulpOptions = {}, | ||
var phantomExecutable = process.platform === 'win32' ? 'phantomjs.cmd' : 'phantomjs', | ||
gulpOptions = {}, | ||
jasmineCss, jasmineJs, | ||
@@ -48,6 +49,14 @@ vendorJs = [], | ||
function hasGlobalPhantom() { | ||
try { | ||
exec('which phantomjs'); | ||
} catch (e) { | ||
return false; | ||
if(process.platform === 'win32') { | ||
try { | ||
exec('where phantomjs'); | ||
} catch (e) { | ||
return false; | ||
} | ||
} else { | ||
try { | ||
exec('which phantomjs'); | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
@@ -95,3 +104,3 @@ return true; | ||
if(hasGlobalPhantom()) { | ||
execPhantom('phantomjs', childArguments, onComplete); | ||
execPhantom(phantomExecutable, childArguments, onComplete); | ||
} else { | ||
@@ -98,0 +107,0 @@ gutil.log(gutil.colors.yellow('gulp-jasmine-phantom: Global Phantom undefined, trying to execute from node_modules/phantomjs')); |
{ | ||
"name": "gulp-jasmine-phantom", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Jasmine 2.0 suite runner, optionally with PhantomJS", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -9,2 +9,6 @@ gulp-jasmine-phantom | ||
This module uses `execSync` which is not available in any version of Node under `0.12.x`. | ||
If you have any specific concerns about upgrading versions of Node or reasons not use | ||
`execSync` feel free to open an issue! | ||
Before you install `gulp-jasmine-phantom` please ensure that you have PhantomJS | ||
@@ -11,0 +15,0 @@ installed on your machine. The plugin assumes that the `phantomjs` binary is |
505084
12889
143