phantom-bluebird
Core phantom modules promisified with bluebird
Usage
npm install phantom-bluebird --save
It is NOT a node module.
This module can be used in phantomjs scripts to use promise api instead of non-standard callback api of phantomjs modules.
webpage module
Same as phantomjs webpage module, but method open
is promisified.
;// replaces webpage and child_process with modules from this package.// don't call this function if you don't want core modules replaced. var webpage = ;// or var webpage = require('phantom-bluebird/lib/webpage');// or var webpage = require('phantom-bluebird').webpage; var page = webpage; page;
Only open method of page object is promisified at the moment.
child_process module
Same as phantom child_process module, but methods are promisified.
spawn
method supports additional options (see example below).
;var spawn = spawn;// or var spawn = require('phantom-bluebird/lib/child_process').spawn; ;
TODO: example for execFile
method.