Open utdrmac opened 6 years ago
We had the same issue. Our solution was to not use the globbing in concat.
This is one of my concat setups..
customer_js: {
options: {
sourceMap: false
},
src: customerJsSources,
dest: 'public/js/customer.js'
},
customerJsSources is ...
var customerJsSources =
[].concat(
commonJsSourcesStart,
['src/customer/js/routes.js'],
commonJsSourcesEnd,
Glob.sync('src/customer/js/**/*.js', {nocase: true}),
['src/customer/js/4-run.js']
);
Explicit ordering. Hundreds of files concatenated in the correct order.
I'm using
"grunt-contrib-concat": "^1.0.1"
. Here's gruntfile parts:When I do
more app.js
on CLI, I am expecting see "jquery.min.js" first, then "bootstrap.min.js" next, then "baller.js" last. But "baller.js" is always first, followed by bootstrap, then jquery.If you change baller.js to "zzz.js", then "zzz.js" is the last part of app.js
Why is grunt-concat not honoring the file names order?