diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc3df71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +.idea/* \ No newline at end of file diff --git a/index.js b/index.js index 68f5689..f71c065 100644 --- a/index.js +++ b/index.js @@ -19,9 +19,9 @@ PhantomJSBrowser.prototype = { name: 'PhantomJS', DEFAULT_CMD: { - linux: 'phantomjs', - darwin: '/usr/local/bin/phantomjs', - win32: process.env.ProgramFiles + '\\PhantomJS\\phantomjs.exe' + linux: require('phantomjs').path, + darwin: require('phantomjs').path, + win32: require('phantomjs').path }, ENV_CMD: 'PHANTOMJS_BIN' }; diff --git a/package.json b/package.json index 7e80577..f7bcf56 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "phantomjs" ], "author": "Vojta Jina ", - "dependencies": {}, + "dependencies": { + "phantomjs": "~1.8" + }, "peerDependencies": { "karma": "~0.9" },