Skip to content

Commit 9133296

Browse files
committed
feat(injector): inject module definitions first
1 parent 6147e76 commit 9133296

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/templates/Gruntfile.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,13 @@ module.exports = function (grunt) {
658658
filePath = filePath.replace('/.tmp/', '');
659659
return '<script src="' + filePath + '"></script>';
660660
},
661+
sort: function(a, b) {
662+
var module = /\.module\.js$/;
663+
var aMod = module.test(a);
664+
var bMod = module.test(b);
665+
// inject *.module.js first
666+
return (aMod === bMod) ? 0 : (aMod ? -1 : 1);
667+
},
661668
starttag: '<!-- injector:js -->',
662669
endtag: '<!-- endinjector -->'
663670
},

0 commit comments

Comments
 (0)