Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.
Rob Larsen edited this page Jan 29, 2013 · 32 revisions

The build script

The build script is a tool that optimizes your code for production use on the web. It's designed to work with HTML5 Boilerplate, but if you're working with another format you should be able to use these tasks as the basis for your own custom build scripts.

Why use it?

Faster page load times and happy end users :)

What it does

  • Combines and minifies javascript (via Closure Compiler)
  • Inlines stylesheets specified using @import in your CSS
  • Combines and minifies CSS (using YUI Compressor)
  • Optimizes JPGs and PNGs (with jpegtran, advpng & optipng)
  • Basic to aggressive html minification (via htmlcompressor)
  • Revises the file names of your assets so that you can use heavy caching (1 year expires).
  • Updates your HTML to reference these new hyper-optimized CSS + JS files
  • Updates your HTML to use the minified jQuery instead of the development version
  • Remove unneeded references from HTML (like a root folder favicon)
  • Runs your JavaScript through a code quality tool like JSLint or JSHint (optional)
  • Runs your CSS through a code quality tool, CSSLint (optional)
  • Cache-busting support for a module directory
  • Optionally precompile LESS formatted CSS
  • Optionally precompile SASS formatted CSS
  • Optionally output JSDOC3 documentation
  • Optionally convert your JPGs to progressive JPGs

##How to Use it