How to use main.js and plugins.js from HTML5 Boilerplate?

There is a similar question that has an accepted answer, but the link to which it refers is no longer available ( even on the return trip machine ). The H5BP documents themselves are not very specific ( here ), at least for a noob like me. And the answer to this similar question still doesn’t explain me very much. This is about how to use plugins.js, but not very specific and does not explain main.js.

Unfortunately, these are the only bits of information that I could find, and I still do not understand what these files are for. So can someone explain:

How to use main.js and plugins.js from HTML5 template?

What is their function, how would I use them?

+6
source share
3 answers

He just suggested an organization.

The idea is to remove the jQuery plugins you use in plugins.js and (depending on the size of the site) do your job in main.js

I described this in detail in the Isboar Docs (although this document refers to scripts.js , not main.js )

+5
source

plugins.js is to put all your provider scripts (not created by you) in one file. You can have tooltio.1.4.js or tablular.min.js or d3.vert.js - and instead of using all these JS files directly on the HTML page, you copy all the codes into plugins.js

Main.js is just the template file provided for you for your own copyright codes.

0
source

You should refer to h5bp other repositories. Check it out https://github.com/h5bp/html5boilerplate.com/blob/master/src/js/main.js

0
source

Source: https://habr.com/ru/post/955091/


All Articles