Closed gkorland closed 11 years ago
I am hesitating to include this as it would mean that PhantomJs would HAVE to be installed through the phantomjs package and not through other (automated) means. I agree that for those who just do all their coding in node it is easier that way but it would make it harder for a node developer to just build on top of an existing setup used by other developers on the same machine for example. I really want node-phantom to be something you slap on top of a system to enhance it, not something that tries to manage the installation and setup for you - other tools would be better suited for that. Correct me if I am wrong.
you're right, is there a way to make it optional?
You can use the "phantomPath" key in the options parameter of phantom.create and set it to whatever phantomjs tells you. This would allow you to decide in your own code to have a dependency on phantomjs without node-phantom having to do it for you.
Adding a dependency https://npmjs.org/package/phantomjs will ease the installation and won't need to assume any global installation.