JSPM

  • Created
  • Published
  • Downloads 35030
  • Score
    100M100P100Q40912F

Headless webkit with JS API

Package Exports

  • phantomjs/bin/phantomjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (phantomjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

phantom

An NPM wrapper for PhantomJS, headless webkit with JS API.

Building and Installing

npm install phantomjs

Or grab the source and

node ./install.js

What this is really doing is just grabbing a particular "blessed" (by this module) version of Phantom. As new versions of Phantom are released and vetted, this module will be updated accordingly.

NOTE: Currently this has only been set up to fetch and run Phantom for MacOS (darwin) and Linux based platforms (as identified by nodejs). If you want windows support, feel free to send a patch.

Running

bin/phantom [phantom arguments]

And npm will install a link to the binary in node_modules/.bin as it is wont to do.

A Note on PhantomJS

PhantomJS is not a library for NodeJS. It's a separate environment and code written for node is unlikely to be compatible. In particular PhantomJS does not expose a Common JS package loader.

This is an NPM wrapper and can be used to conveniently make Phantom available It is not a Node JS wrapper.

I have had reasonable experiences writing standalone Phantom scripts which I then drive from within a node program by spawning phantom in a child process.

Read the PhantomJS FAQ for more details: http://phantomjs.org/faq.html

Contributing

Questions, comments, bug reports, and pull requests are all welcome. Submit them at the project on GitHub.

Bug reports that include steps-to-reproduce (including code) are the best. Even better, make them in the form of pull requests.

Author

Dan Pupius (personal website), supported by The Obvious Corporation.

License

Copyright 2012 The Obvious Corporation.

Licensed under the Apache License, Version 2.0. See the top-level file LICENSE.txt and (http://www.apache.org/licenses/LICENSE-2.0).