phantomjs custom module - require and create - wade.one
Recently I’ve been working with phantomjs in order to do some on-page control without wanting to use an actual browser (phantomjs is headless and requires no X server to be running). One of the first things I wanted to do was created custom modules so I could organise my code clearly. I found a surprising lack of information on this topic so decided to quickly write up how I did it so it follows how the included modules work. To use a custom module, you need to prefix the require with a path (./ works fine for the current directory) and … Continue reading →