I'm using grunt-contrib-concat to concatenate all my custom JS files together, and wrap them with an IIFE. I'm running into some load order issues ( namely, my init file is executing before some modules, causing undefined errors ). I want to specify init.js
should be LAST in the concat order, but I don't want to specify the order for all the other JS files as well, just that this specific one goes last.
Here is the current config of my concat:
/**
* Set project info
*/
project: {
src: 'src',
app: 'app',
assets: '<%= project.app %>/assets',
css: [
'<%= project.src %>/scss/style.scss'
],
js: [
'<%= project.src %>/js/*.js'
]
},
concat: {
dev: {
files: {
'<%= project.assets %>/js/scripts.min.js': '<%= project.js %>'
}
},
options: {
stripBanners: true,
nonull: true,
banner: ';(function($, window, document, undefined){ \n "use strict";',
footer: '}(jQuery, window, document));'
}
},
How do I specify a last file to be concatenated without adding an extra grunt module to my project?