-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package for NPM #50
Comments
I'm not sure it would make sense, since it's not Node-based (it runs in the PhantomJS environment, wholly separate from Node). So at most npm would just be installing an executable. |
Is there any way to actually run phantom from nodejs btw? El sábado, 31 de mayo de 2014, Nick Rabinowitz [email protected]
Rafael Vidaurre S. |
You can run Phantom from Gulp, which uses NodeJS: https://www.npmjs.com/package/gulp-phantom And you can make a phantom server that runs in nodeJS: https://www.npmjs.com/package/phantomjs-server --intended to replace a Selenium server. Also, phantomjs itself does have an npm package: https://www.npmjs.com/package/phantomjs Although phantomJS has no CommonJS loader, you could probably use something like WebPack to get around this, especially if an npm module were specifically written to work with phantomJS as such. I think it could make sense to package this as an npm module, but it'd need to be modified it to ensure it can interface with the Node server-spawned PhantomJS process 'out of the box'. |
I would love to use this as a node package. I want to scrape some pages and pipeline it on to the rest of my code for further processing (save in db, websockets updates to clients, etc). Starting phantomjs in a child process would be fine. I could see this supported "natively" but it might also work via a wrapper around this project. To support "wrapped mode", how should the child process communicate? Does it write (only) json to stdout and all errors to stderr? |
Wouldn't it be good to package this to npm?
The text was updated successfully, but these errors were encountered: