Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (54 sloc) 4.36 KB
{
"name": "phantomjs",
"version": "1.8.2-2",
"keywords": [
"phantomjs",
"headless",
"webkit"
],
"description": "Headless WebKit with JS API",
"homepage": "https://github.com/Obvious/phantomjs",
"repository": {
"type": "git",
"url": "git://github.com/Obvious/phantomjs.git"
},
"licenses": [
{
"type": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
],
"author": {
"name": "Dan Pupius",
"email": "dan@obvious.com",
"url": "http://pupius.co.uk"
},
"maintainers": [
{
"name": "Dan Pupius",
"email": "dan@obvious.com",
"url": "http://pupius.co.uk/"
}
],
"main": "lib/phantomjs",
"bin": {
"phantomjs": "./bin/phantomjs"
},
"scripts": {
"install": "node install.js",
"test": "nodeunit --reporter=minimal test/tests.js"
},
"dependencies": {
"rimraf": "~2.0.2",
"unzip": "0.1.6-alpha"
},
"devDependencies": {
"nodeunit": "~0.7.4"
},
"readme": "phantom\n=======\n\nAn NPM wrapper for [PhantomJS](phantomjs.org), headless webkit with JS API.\n\nBuilding and Installing\n-----------------------\n\n```shell\nnpm install phantomjs\n```\n\nOr grab the source and\n\n```shell\nnode ./install.js\n```\n\nWhat this is really doing is just grabbing a particular \"blessed\" (by\nthis module) version of Phantom. As new versions of Phantom are released\nand vetted, this module will be updated accordingly.\n\nThe package has been set up to fetch and run Phantom for MacOS (darwin),\nLinux based platforms (as identified by nodejs), and -- as of version 0.2.0 --\nWindows (thanks to [Domenic Denicola](https://github.com/domenic)). If you\nspot any platform weirdnesses, let us know or send a patch.\n\nRunning\n-------\n\n```shell\nbin/phantom [phantom arguments]\n```\n\nAnd npm will install a link to the binary in `node_modules/.bin` as\nit is wont to do.\n\nRunning via node\n----------------\n\nThe package exports a `path` string that contains the path to the\nphantomjs binary/executable.\n\nBelow is an example of using this package via node.\n\n```javascript\nvar childProcess = require('child_process')\nvar phantomjs = require('phantomjs')\nvar binPath = phantomjs.path\n\nvar childArgs = [\n path.join(__dirname, 'phantomjs-script.js'),\n 'some other argument (passed to phantomjs script)'\n]\n\nchildProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {\n // handle results\n})\n\n```\n\nVersioning\n----------\n\nThe NPM package version tracks the version of PhantomJS that will be installed,\nwith an additional build number that is used for revisions to the installer.\n\nAs such `1.8.0-1` will `1.8.0-2` will both install PhantomJs 1.8 but the latter\nhas newer changes to the installer.\n\nA Note on PhantomJS\n-------------------\n\nPhantomJS is not a library for NodeJS. It's a separate environment and code\nwritten for node is unlikely to be compatible. In particular PhantomJS does\nnot expose a Common JS package loader.\n\nThis is an _NPM wrapper_ and can be used to conveniently make Phantom available\nIt is not a Node JS wrapper.\n\nI have had reasonable experiences writing standalone Phantom scripts which I\nthen drive from within a node program by spawning phantom in a child process.\n\nRead the PhantomJS FAQ for more details: http://phantomjs.org/faq.html\n\nContributing\n------------\n\nQuestions, comments, bug reports, and pull requests are all welcome. Submit them at\n[the project on GitHub](https://github.com/Obvious/phantomjs/). If you haven't contributed to an\n[Obvious](http://github.com/Obvious/) project before please head over to the\n[Open Source Project](https://github.com/Obvious/open-source#note-to-external-contributors) and fill\nout an OCLA (it should be pretty painless).\n\nBug reports that include steps-to-reproduce (including code) are the\nbest. Even better, make them in the form of pull requests.\n\nAuthor\n------\n\n[Dan Pupius](https://github.com/dpup)\n([personal website](http://pupius.co.uk)), supported by\n[The Obvious Corporation](http://obvious.com/).\n\nLicense\n-------\n\nCopyright 2012 [The Obvious Corporation](http://obvious.com/).\n\nLicensed under the Apache License, Version 2.0.\nSee the top-level file `LICENSE.txt` and\n(http://www.apache.org/licenses/LICENSE-2.0).\n",
"_id": "phantomjs@1.8.2-2",
"dist": {
"shasum": "07e9383e2c7a92895914a041d1826e580a33bca6"
},
"_from": "phantomjs"
}