Hands up – as a developer, how many of you have used YSlow? Good – a fair few; have you thought about automating those checks though?
That's right! We can always perform manual checks to get a feel for where performance bottlenecks are showing; however, the smarter way is to automate those checks using our good friend, Grunt. A module, created by the developer Andy Shora, is available for this purpose; we can get the source code for it from https://github.com/andyshora/grunt-yslow. Let's take a moment to get it up and running, to see how it works:
Let's kick off by creating a project folder for our files. For the purpose of this exercise, I will assume it is called
chapter13
(yes, I know – highly original); change the name if yours is different.For this exercise, we need to use NodeJS. I will assume you already have it installed from previous exercises; if not, then head over to http://www.nodejs.org to download and install the version appropriate for your...