-
Book Overview & Buying
-
Table Of Contents
PhantomJS Cookbook
By :
In this recipe, we will demonstrate how to execute a simple performance analysis using confess.js.
To run this recipe, we will need a target URL.
We will use confess.js to analyze that target URL and produce a lightweight performance report.
Details about how to obtain confess.js are included in the Listing CSS properties recipe, earlier in this chapter.
Lastly, the script in this recipe runs against the demo site that is included with the book's sample code repository. To run that demo site, we must have Node.js installed. In a separate terminal, change to the phantomjs-sandbox directory (in the sample code's directory), and start the app with the following command:
node app.js
With the Node.js demo app running, make sure we are in the root directory for the book's sample code, and enter the following on the command line:
phantomjs lib/confess/confess.js http://localhost:3000/css-demo performance lib/confess/config.json
Something...
Change the font size
Change margin width
Change background colour