joliss / broccoli-bower

Load Bower packages into Broccoli
MIT License
10 stars 6 forks source link

Bower Deps Order #12

Closed osdevisnot closed 6 years ago

osdevisnot commented 9 years ago

With jquery and angular as bower deps, bowerFiles() returns deps in incorrect order. This causes angular to use jqLite instead of jquery.

The problem is highlighted in repo here: https://github.com/abhishekisnot/broccoli-bower-demo

After cloning that repo, run npm install and npm run-script postinstall and check public/scripts/vendor.js

I think, broccoli-bower should look at bower.json to figure out deps order.

ankeetmaini commented 9 years ago

Is there any workaround currently? It fails with bootstrap. jQuery is added to the concatenated file later.

ankeetmaini commented 9 years ago

I managed to get this working by giving the order in concat plugin like this

var javascripts = concat(dependencyTree, {
inputFiles: ['**/jquery.js', '**/*.js'],
outputFile: '/assets/app.js'
});

This makes sure, the jquery library is always added first.

joliss commented 9 years ago

I'm not maintaining this repo at the moment; I recommend avoiding it and manually wiring up your bower_components/foo/lib-type paths.