Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower and Modernizr

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.

like image 554
Dennis Best Avatar asked Jul 22 '13 23:07

Dennis Best


People also ask

What is modernizr package?

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user's browser.

What is modernizr min JS?

Modernizr is a JavaScript library that detects the features available in a user's browser. This lets web pages avoid unsupported features by informing the user their browser isn't supported or loading a polyfill.

What is Bower and how to use it?

Enter Bower, a package manager that makes it easy to manage all your application’s front-end dependencies. In this blog post you are going to learn how to get up and running with Bower. You’ll start by installing the Bower command-line utility and then go on to learn about the various commands that are available for managing packages.

What are the properties of a bower package?

The bower.json file is actually used to define a Bower package, so in effect you’re creating your own package that contains all of the dependencies for your application. The properties used in this example are explained below. name – The name of your application/package. version – A version number for your application/package.

What is the difference between NPM and Bower?

Both npm and Bower work with specialized manifest files that contain information about a project and a list of packages it uses. With npm projects that file is named “package.json” and in Bower projects it’s named “bower.json”.

How do I install Bower on macOS?

Mac users, because we’re using the -g flag to install Bower globally remember you’ll likely need to include sudo at the start of the command, then enter your password when prompted. Both npm and Bower work with specialized manifest files that contain information about a project and a list of packages it uses.


1 Answers

That's not the responsibility of Bower.

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

like image 60
Sindre Sorhus Avatar answered Oct 14 '22 18:10

Sindre Sorhus