diff --git a/index.js b/index.js index f81d529..c0e02ae 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ var path = require( 'path' ), - _ = require( 'lodash' ), + pick = require( 'lodash/pick' ), configModule = require( './lib/config' ), detect = require( './lib/detect' ), run = require( './lib/run' ), @@ -75,7 +75,7 @@ function getLauncher( configFile, callback ) { getLauncher.detect = function( callback ) { detect( function( browsers ) { callback( browsers.map( function( browser ) { - return _.pick( browser, [ 'name', 'version', 'type', 'command' ] ); + return pick( browser, [ 'name', 'version', 'type', 'command' ] ); } ) ); } ); }; diff --git a/lib/detect.js b/lib/detect.js index b6f60ff..afb843a 100644 --- a/lib/detect.js +++ b/lib/detect.js @@ -1,7 +1,7 @@ var spawn = require( 'child_process' ).spawn, winDetect = require( 'win-detect-browsers' ), darwin = require( './darwin' ), - extend = require( 'lodash' ).extend, + extend = require( 'lodash/extend' ), browsers = { 'google-chrome': { name: 'chrome', diff --git a/lib/run.js b/lib/run.js index d85ba69..16c4dad 100644 --- a/lib/run.js +++ b/lib/run.js @@ -4,7 +4,7 @@ var headless = require( 'headless' ), fs = require( 'fs' ), path = require( 'path' ), Uid = require( 'uid' ), - _ = require( 'lodash' ), + extend = require( 'lodash/extend' ), Instance = require( './instance' ), setups = {}; @@ -39,7 +39,7 @@ setups.firefox = function( browser, uri, options, callback ) { host = JSON.stringify( match[ 1 ] ), port = match[ 2 ] || 80; - _.extend( prefs, { + extend( prefs, { 'network.proxy.http': host, 'network.proxy.http_port': +port, 'network.proxy.type': 1, @@ -53,7 +53,7 @@ setups.firefox = function( browser, uri, options, callback ) { } if ( options.prefs ) { - _.extend( prefs, options.prefs ); + extend( prefs, options.prefs ); } prefs = Object.keys( prefs ).map( function( name ) { @@ -283,7 +283,7 @@ module.exports = function runBrowser( config, name, version ) { browser.tempDir = options.tempDir; - callback( null, new Instance( _.extend( {}, browser, { + callback( null, new Instance( extend( {}, browser, { args: args, detached: options.detached, env: env, diff --git a/package.json b/package.json index 9b1cc71..cbaf5bf 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "headless": "^0.1.7", - "lodash": "^2.4.1", + "lodash": "^4.0.0", "mkdirp": "^0.5.0", "osenv": "^0.1.0", "plist": "^1.0.1",