How do I use main.js and plugins.js from HTML5 Boilerplate?

user1694077 picture user1694077 · Oct 2, 2013 · Viewed 10.9k times · Source

There is a similar question that has an accepted answer, but the link it refers to is no longer available (not even on the wayback machine). The H5BP docs themselves are not very specific on this subject (here), at least not for a noob like me. And the answer to this similar question still doesn't explain much to me. It sort of touches on how to use plugins.js, but isn't very specific and doesn't explain main.js.

Unfortunately, these are the only bits of information I could find, and I still don't really understand what these files are for. So can anyone explain;

How do I use main.js and plugins.js from the HTML5 boilerplate?

What is their function, how would I use them?

Answer

roblarsen picture roblarsen · Oct 2, 2013

It's just suggested organization.

The idea is to drop jQuery plugins you're using into plugins.js and (depending on the size of the site) do your work in main.js.

I wrote it up in detail in the Isboar standards docs (although that doc refers to scripts.js and not main.js)