Bower and Modernizr

Dennis Best picture Dennis Best · Jul 23, 2013 · Viewed 20.7k times · Source

I'm aware that I can create a custom build build of Modernizr to detect the features I care about. But is there a way to use Modernizr installed with Bower to detect a specific feature or set of features (such as SVG support) without including the entire library?

Basically when I do

bower install modernizr

I will get the entire library which is more than I need.

Answer

Sindre Sorhus picture Sindre Sorhus · Jul 25, 2013

That's not the responsibility of Bower.

You can use grunt-modernizr to detect which tests you need and build a custom Modernizr version.