-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
32 lines (32 loc) · 4.46 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"name": "spooky",
"version": "0.2.1",
"author": {
"name": "Lon Ingram",
"email": "lon@waterfallmobile.com"
},
"description": "Drive CasperJS from Node.js",
"main": "./lib/spooky.js",
"dependencies": {
"underscore": "1.3.x",
"async": "0.1.x",
"tiny-jsonrpc": "0.2.x",
"carrier": "0.1.x",
"duplexer": "0.0.x"
},
"devDependencies": {
"mocha": "1.3.x",
"expect.js": "0.1.x",
"cucumber": "*",
"http-server": "0.5.x"
},
"license": "MIT",
"readme": "# SpookyJS\n\nDrive [CasperJS](http://casperjs.org/) from Node.js.\n\n**Important: the advent of native WebDriver support in [PhantomJS\n1.8](http://phantomjs.org/release-1.8.html) has made Spooky's future\nuncertain.** I am inclined to deprecate Spooky and encourage everyone to use\nWebDriver. Please comment on\n[#26](https://github.com/WaterfallEngineering/SpookyJS/issues/26) if you disagree.\n\n## Installation\n\n### Prerequisites\n\n* [Node.js](http://nodejs.org)\n* [PhantomJS](http://phantomjs.org/)\n* [CasperJS](http://casperjs.org/)\n\nSpookyJS is available from npm.\n\n``` shell\n$ npm install spooky\n```\n\n## Usage\n\n``` javascript\ntry {\n var Spooky = require('spooky');\n} catch (e) {\n var Spooky = require('../lib/spooky');\n}\n\nvar spooky = new Spooky({\n casper: {\n logLevel: 'debug',\n verbose: true\n }\n }, function (err) {\n if (err) {\n e = new Error('Failed to initialize SpookyJS');\n e.details = err;\n throw e;\n }\n\n spooky.on('error', function (e) {\n console.error(e);\n });\n\n /*\n // Uncomment this block to see all of the things Casper has to say.\n // There are a lot.\n // He has opinions.\n spooky.on('console', function (line) {\n console.log(line);\n });\n */\n\n spooky.on('log', function (log) {\n if (log.space === 'remote') {\n console.log(log.message.replace(/ \\- .*/, ''));\n }\n });\n\n spooky.start(\n 'http://en.wikipedia.org/wiki/Spooky_the_Tuff_Little_Ghost');\n spooky.thenEvaluate(function () {\n console.log('Hello, from', document.title);\n });\n spooky.run();\n });\n```\n\nA minimal example can be found in the repo under `examples`. Run it like this:\n\n``` shell\n$ node examples/hello.js\n```\n\nA small example [Cucumber.js](https://github.com/cucumber/cucumber-js/) test suite can be found in the repo under `examples/cucumber`. To run the suite:\n\n``` shell\n$ make cucumber.js\n```\n\nYou may change the port that the fixture server runs on by setting the `TEST_PORT` make parameter.\n\nSee the tests for an example of how to use SpookyJS with [Mocha](http://visionmedia.github.com/mocha). \n\n## Known issues\n\nSpooky's `stdio` transport reportedly does not work on Windows and Ubuntu.\n\nThe `http` transport hangs when using Phantom 1.8 with older versions of\nCasperJS.\n\n## Development\n\n### Running the tests\n\nSpookyJS includes a suite of unit tests, driven by [Mocha](http://visionmedia.github.com/mocha). To run the tests:\n\n``` shell\n$ make test\n```\n\nThe following make parameters are supported (defaults are in parentheses):\n\n* `TEST_REPORTER` the [Mocha reporter](http://visionmedia.github.com/mocha/#reporters) to use (dot)\n* `TEST_PORT` the port to run the fixture web server on (8080)\n* `TEST_TIMEOUT` threshold in ms to timeout a test (4000)\n* `TEST_SLOW` threshold in ms to say a test is slow (2000)\n* `TEST_ARGS` Additional [arguments](http://visionmedia.github.com/mocha/#usage) to pass through to Mocha\n* `TEST_DEBUG` Print debug logging to the console (false)\n* `TEST_TRANSPORT` the Spooky transport to use when running the tests (stdio)\n\n## License\n\nSpookyJS is made available under the [MIT License](http://opensource.org/licenses/mit-license.php).\n\n## Acknowledgements and Attribution\n\nThe image `tests/fixtures/fail-road.jpeg` is the work [Fail\nRoad](http://www.flickr.com/photos/fireflythegreat/2845637227/) and is\ncopyright (c) 2007\n[fireflythegreat](http://www.flickr.com/photos/fireflythegreat/) and made\navailable under an [Attribution 2.0\nGeneric](http://creativecommons.org/licenses/by/2.0/deed.en) license.\n",
"readmeFilename": "README.md",
"_id": "spooky@0.2.1",
"dist": {
"shasum": "16646af92a31ecc3df468d01c26e45722373b9b6"
},
"_from": "spooky@",
"_resolved": "https://registry.npmjs.org/spooky/-/spooky-0.2.1.tgz"
}