Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency order #1897

Closed
bobmulder opened this issue Aug 26, 2015 · 10 comments
Closed

Dependency order #1897

bobmulder opened this issue Aug 26, 2015 · 10 comments

Comments

@bobmulder
Copy link

Hey guys,

I am using Bower (of course...). And use dependencies like jQuery, Bootstrap and AngularJS. However, some plugins of Angular need to be loaded AFTER jQuery.
I've sorted my dependencies in my bower.json, and I am using wiredep (gulp) to add them to my index.html. However, when I am loading a dependency, or update Bower, the whole order (I created myself) of dependencies is gone, and Bower did it on alphabetical order. In that case I am getting errors on my index.html because jQuery is loaded too late...

How am I able to use my own order in my dependencies?

Greetz

Bob

@arodiss
Copy link

arodiss commented Aug 26, 2015

@bobmulder
bower is for installing packages, not for managing load order
If you want to specify your vendors dependencies, I suggest you to take a look on require.js: http://requirejs.org/

@hteek
Copy link

hteek commented Aug 27, 2015

Seriously!? The decision to order the dependencies in alphabetical order breaks al lot of automated builds. If you want to order the dependencies do it right and take the dependencies own dependencies into account! Dependency management is not just dumping dependency names in alphabetical order. At least you could have given users a choice wether to use your auto-sorting or not.

@bobmulder
Copy link
Author

👍 for @tschilla. I think an option to enable auto-sort would be very helpfull.

@leocaseiro
Copy link

+1

An option to disable auto-sort would be very helpfull.
I also use jQuery and AngularJS and I use gulp task with bower-main to add automatically my dependencies, however, jQuery needs to load before AngularJS.

I've been using Bower for a long time. The Issue #1381 should be optional.

Suggestion:
.bowerrc
{ auto-sort: false }

In addiction, this feature(auto-sort:false) would avoids conflicts in pull requests, the last line is my preference to add new packages, otherwise I have to deep through all the dependencies bellow the line added.

@michgeek
Copy link

michgeek commented Sep 2, 2015

👍 for this option.
I've encountered the same problem. #1381

👎 @arodiss developers have been controlling dependencies order and using wiredep to inject their dependencies in the same order as they are declared since ages. Forcing devs to use new libs or maintain a second array to manage the order is a regression. IMO this alphabetical order trend is a useless candy-eye sparkles.

@lustdante
Copy link

+1

This alphabetical auto-sorting caused a glitch that could have jeopardized our business if left unaddressed and it took us hours to discover this. There is not even an option to disable this.

I believe it all started with this discussion. #1373

@jeongsd
Copy link

jeongsd commented Sep 8, 2015

👍 for @tschilla
👎 @arodiss

@michgeek
Copy link

Fixed 9c52ec2 #1373 (comment)

@sheerun
Copy link
Contributor

sheerun commented Sep 24, 2015

Auto-sorting is reverted in 1.5.3

@sheerun sheerun closed this as completed Sep 24, 2015
@bobmulder
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants