Permalink

33

Spring-cleaning Unused CSS With Grunt, Gulp, Broccoli or Brunch

Spring-cleaning unused CSS

The tough economic times on Tatooine hit everyone hard, including the Jawas.

Delivering a fast experience on the web usually involves reducing server response time, minification of CSS/JS/HTML and an optimisation of images and above-the-fold content. We can further minimize the latency caused by stylesheet loading by removing unused CSS rules delivered to the client.

In this write-up, we’ll take a look at build tasks you can use to remove unused CSS in your pages. Before we begin, I thought it would be useful to share some success stories just to demonstrate that the tools here can be used to make a difference. Continue Reading →

Permalink

8

Environment-specific Builds With Grunt, Gulp or Broccoli

Image credit: http://www.flickr.com/photos/brianneudorff/9109932159/

Image credit: http://www.flickr.com/photos/brianneudorff/9109932159/

The dev, staging and production versions of our projects can vastly vary, which is one reason we may need to change paths to resources (scripts/styles/templates), generated markup or other content based on environment and target-specific information. Luckily there exist a number of build tasks in the Grunt, Gulp and Broccolli eco-systems that can help us here.

Today I’ll cover three approaches to this problem – string replacement, conditional comments and template variables. The option you end up choosing will likely depend on where you’re happy for the bulk of your conditional logic to exist. Continue Reading →

Permalink

11

Ghostbusting For Front-end Developers

Ghostbusting for front-end developers

Human sacrifice, dogs and cats living together… mass hysteria! We’d like to avoid that, right? Well, today we’re going to talk about how to improve the accuracy of your front-end testing environment so you’re not chasing ghosts. This is important for anyone building high-performance apps for the web.

All engineering requires environmental assumptions. This is particularly important when we’re measuring the quality and performance of the web experiences we create. A faster web is a better web, but before you can achieve this, you need to ask yourself – is your room clean?
Continue Reading →