Does phantomjs have something similar to node_modules (from nodejs) ?
This is so I can use something like require('moduleName'); to make the code cleaner.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use injectJs to dynamically load phantom scripts.
From the wiki
injectJs(filename) {boolean}
Injects external script code from the specified file into the Phantom outer space. If the file cannot be found in the current directory, libraryPath is used for additional look up. This function returns true if injection is successful, otherwise it returns false.
https://github.com/ariya/phantomjs/wiki/API-Reference