Skip to content

Latest commit

 

History

History
87 lines (67 loc) · 2.96 KB

readme.md

File metadata and controls

87 lines (67 loc) · 2.96 KB

The h5bp build script now has three versions, the main one being the [ant-build-script][]. This project is the node version, and it uses Grunt as a build tool.

It is packaged as a grunt plugin and provides you a bunch of tasks and helpers to help improve the performance of your site/app in a production environment.

Description

This node/grunt-based build script tries to be as close as possible to the [ant-build-script][], a really great project you should check out.

It is still in early stage of development, but will get better, thanks to your feedback.

Quick start

Fancy one line install:

# see the gist: https://gist.github.com/2416597
$ curl https://raw.github.com/gist/2416597/install.sh | sh

Slightly less fancier

$ npm install https://github.com/m0rganic/h5bp-project-builder/tarball/master -g
$ h5bp help
$ h5bp init

Developing locally

$ git clone git://github.com/h5bp/node-build-script.git
$ cd node-build-script
$ npm link

Features

  • Concats / Compresses JS
  • Concats / Compresses CSS
  • Inline CSS imports via RequireJS
  • Basic to aggressive html minification (via [html-minfier][])
  • Optimizes JPGs and PNGs (with jpegtran & optipng)
  • Renames JS/CSS to prepend a hash of their contents for easier versioning
  • Revises the file names of your assets so that you can use heavy caching
  • Updates your HTML to reference these new hyper-optimized CSS + JS files
  • Experimental dom-based (with JSDOM) build system.
  • May rerun the build script on file changes (grunt's watch task ❤)
  • May automatically reload the page in your browsers whenever watched files change, through some [socket.io] magic.

Getting started

Project information

Run the tests

$ npm test

[Getting Started]: https://github.com/gruntjs/grunt/blob/master/docs/getting_started.md#readme) [JSDOM]: https://github.com/tmpvar/jsdom [ant-build-script]: https://github.com/h5bp/ant-build-script [socket.io]: http://socket.io [html-minifier]: https://github.com/kangax/html-minifier