Closed kennethlynne closed 8 years ago
In my case I solved it with https://www.npmjs.com/package/anysort, sorting bowerDeps.js
. Maybe an idea to use that and let users provide sorting order patterns?
This also did the trick:
function sortDat(arr, patterns) {
return patterns
.reduce(function (result, pattern) {
arr = arr.reduce(function (nonmatching, path) {
if (minimatch(path, pattern)) {
result.push(path);
return nonmatching;
}
return nonmatching.concat([path]);
}, []);
return result;
}, [])
.concat(arr);
}
// Sort bower dependencies in the order of the patterns in this array, and leave the sorting order of the
// non-matching intact
var order = [
'**/jquery/**',
'**/lodash/**'
];
bowerDeps.js = sortDat(bowerDeps.js, order);
FWIW, my workaround for this was to define jquery to not have a main in overrides and then adding jquery script tag before <!-- bower:js -->
.
"overrides" : {
"jquery" : {
"main" : []
}
}
Closing this as there are workarounds available
I want to change order of files imported, and I can specify
y
as a dependancy forx
in overrides, but in my case I only want that to be the case in dev and I do not wanty
included in prod.Related to #163