gruntjs - Creating a custom dependency block -
i'm trying load in multiple js dependencies page. per best practice etc i'm loading in js @ bottom of page, have particular js file need load in head.
how go making block loads in particular dependency in <head>
other js files carry on loading in bottom of page?
this particular case happens in yoeman's webapp generator loads modernizr in head , rest of scripts near bottom. if problem dependency facing being injected @ bottom have exclude using following:
wiredep: { app: { .... exclude: [ 'bower_components/path-to-the-file-you-dont-want-wiredep-to-inject' ], } }
and in head add following:
<!-- build:js scripts/vendor/custom-script.js --> <script src="bower_components/path-to-the-file-you-dont-want-wiredep-to-inject"></script> <!-- endbuild -->
Comments
Post a Comment