How to manage combining and concatenating JavaScript Polyfills when using Modernizr

[SIZE=3]I am working to implement Modernizr for the first time and I need help with questions about polyfill management.

I am trying to parse various instructions from H5BP and Modernizr tutorials regarding combining JS files onto one document, concatenating + minifying, and script loading via Modernizr.

  1. Is it still useful or needed to combine scripts into one file if they are being loaded by Modernizr?

  2. Would putting all of the files into one document cause Modernizer to load all of the scripts every time, just to get to the one needed?

  3. Can you show an example of combining two scripts on one page manually? Every tutorial says “too hard - use a concatenator” and skips over the visual of what a javascript mashup looks like. What does it look like to string an array of JavaScripts together? Maybe this is so basic but I cannot find such a visual example.

  4. If many plugins are combined within one JS file, what is an example of the path to each specific JavaScript file to type into the Modernizr.load script?

Something like


(?) or only


and they are all loaded (?)

  1. Is it better to just keep related JS files in a folder and let Modernizr load them separately? Is there any loss of loading speed that way?

  2. If I am loading JQuery Plugins via Modernizr, do I also still need to add them in Modernizr using a

(function($){ ... })(jQuery);

closure to make sure they’re in the jQuery namespace, as H5BP suggests? What does that pattern look like?

  1. If I do keep each JS file separate for development, and then concatenate them for launch, do I then need to change the Modernizr.load script?

Thanks. :)[/SIZE]