You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
Now I also need to include exactly the same libraries in listView.html and userProfile.html. And as this is not a Single Page Application. These lines may also need to be included like this:
As you may know the usemin plugin has 2 tasks: useminPrepare and usemin.
The useminPrepare task is the one responsible for running all the necessary processing on your files (concatenation, minification etc) and generating the "final (js or css, for example) file".
The usemin task just replaces your block with a link to the /path/to/js.js file.
The trick is: Configure your useminPrepare task to process only one single HTML file from this "group of repetition".
This way you'll generate the concatenated/minified file only once, and when the usemin task runs, it will just replace the block content with the file declared on your block.
For example, I have a usemin target like this in
index.html
Now I also need to include exactly the same libraries in
listView.html
anduserProfile.html
. And as this is not a Single Page Application. These lines may also need to be included like this:In
listView.html
:And in
userProfile.html
:which looks quite boring and inefficient..
Is there an easier way to do this in grunt-usemin?
The text was updated successfully, but these errors were encountered: