Answer the question
In order to leave comments, you need to log in
What tool (like grunt) allows you to collect html from other html files?
After reading a lot of material on the subject of the BEM methodology, as well as a long work on the site, the design of which changes exactly in those places that are found on each page, there was a need for a technology for assembling the main html files (index.html, www/portf/*. html), by including other html files in them, each of which is a self-sufficient set of elements.
Approximately according to this technology, this should be implemented (I describe the concept from my head):
Each individual module (site element, for example: <div id="menuWR"> <ul> ...</ul> </div>
) is located in a separate folder with all its own js and css (that is, jq, which is used in all folders, is connected from the root file ) and get something like this path from the root file: "modules/menu/menu.html menu.js menu.css".
Index.html is a file that specifies where and what to include from external files (for example:
<nav> import("modules/menu/menu.html", "#menuWR")</nav>
) <nav> <div id="menuWR"><ul> ...</ul> </div></nav>
) Answer the question
In order to leave comments, you need to log in
https://www.npmjs.org/package/gulp-file-include
https://github.com/vanetix/grunt-includes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question