Neatly packaged Modernizr JS assets for use in Sprockets or the Rails 3 asset pipeline.
modernizr to your Gemfile.
Should be automatically added to your asset load path.
modernizr to your Gemfile as well, but you'll also have to manually setup your Sprockets load path. Depending on your setup, require
modernizr and add
Modernizr.path to your Sprockets environment.
env = Sprockets::Environment.new require 'modernizr' env.append_path Modernizr.path
Now you'll just need to require
//= require modernizr
That will pull in all the core feature detections.
You can also pull in optional community detections:
//= require modernizr //= require modernizr/contenteditable //= require modernizr/cors //= require modernizr/emoji
See a full list of community detects under feature-detects/.
New versions of this gem will only be published when there is a new stable version of Modernizr. Maybe if they do an official beta, I might too. But otherwise no untagged releases.
This project isn't that interesting, yet...
If you look the Modernizr download page, you'll notice you can customize and opt out of alot more stuff. At the moment, this library can only exclude the detections in the community add-ons section. Kinda sucks.
Well, good news is that Modernizr v3 is supposed to moving most of its "core" feature detects out of the main file into seperate ones. Once this happens you'll be able to get the same level of granularity from this gem as the awesome download builder.
Follow along Modernizr issue #486.