Permalink
Browse files

use phantomjs node module. closes #9

  • Loading branch information...
1 parent 5dc4029 commit 1431b07ffe91d3eeacf3f51c5d994eb5f6b41cad @juliangruber committed Feb 25, 2013
Showing with 7 additions and 14 deletions.
  1. +1 −10 README.md
  2. +3 −2 lib/snapshot.js
  3. +3 −2 package.json
View
@@ -137,16 +137,7 @@ Start the review server on port `port`.
## Installation
-You need to have phantomjs (>=1.7 if you want to use cookies) installed, get it
-via
-
-```bash
-$ brew install phantomjs
-```
-
-or check [phantomjs.org](http://phantomjs.org/)
-
-Then
+There is no need to have phantomjs installed, it will be fetched together with `review`.
```bash
$ npm install -g review # for cli
View
@@ -8,6 +8,7 @@ var mkdirp = require('mkdirp')
var path = require('path')
var EventEmitter = require('events').EventEmitter
var fs = require('fs')
+var phantomjs = require('phantomjs')
/**
* cache handling
@@ -28,7 +29,7 @@ var script = __dirname + '/../script/rasterize.js'
module.exports = function (app) {
function snapshot (params, cb) {
- var ps = spawn('phantomjs', [
+ var ps = spawn(phantomjs.path, [
script, params.url, params.resolution,
params.wait, app.get('cut'), JSON.stringify(app.get('cookie'))
])
@@ -106,4 +107,4 @@ module.exports = function (app) {
createCache()
})
}
-}
+}
View
@@ -1,6 +1,6 @@
{
"name": "review",
- "version": "0.7.5",
+ "version": "0.8.0",
"description": "Regression testing visual review tool",
"main": "index.js",
"repository": "git://github.com/juliangruber/review",
@@ -22,6 +22,7 @@
"jade": "~0.28.1",
"express": "~3.0.6",
"mkdirp": "~0.3.4",
- "span": "0.0.5"
+ "span": "0.0.5",
+ "phantomjs": "~1.8.1-3"
}
}

0 comments on commit 1431b07

Please sign in to comment.