Create custom Modernizr builds from the command line.
modernizr-buildr
is a simple tool that allows you to create custom
Modernizr builds from the command line. It's a very basic
PhantomJS wrapper that browses to the
Modernizr download page and generates a build
with optional tests.
It's not meant to be used in any sort of production environment, and has been created as a convenience tool born out of sheer laziness. I wanted a quick way of adding a couple of extra options to an existing Modernizr build without having to visit the site and check checkboxes.
git clone git@github.com:BenConstable/modernizr-buildr.git
cd modernizr-buildr
npm install -g
If you've already got PhantomJS installed and you don't want to install it again
through npm, you can skip npm install
and just call the
modernizr-buildr.js
script with PhantomJS directly:
phantomjs modernizr-buildr.js [--tests shiv-...]
However, this is not recommended, purely for ease of use.
modernizr-buildr
accepts a dash-separated list of build options as --tests
.
This makes it easy to copy and paste an existing set of options from an existing
Modernizr build.
The generated script will be passed to STDOUT, so if you'd like to create a file then do something like the following:
modernizr-buildr -t history-touch-shiv-mq-cssclasses > modernizr.min.js
Also, see:
modernizr-buildr -h
## Related
- Modernizr: http://modernizr.com/
- PhantomJS: http://phantomjs.org/