Question

As far as I understand Bower you have to provide a pre-build distribution of your package:

Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you’re looking for.

But in many projects such pre-build files are not part of the GitHub repository (for very good reasons). Regarding to this post your are able to attach archives to an release/tag of an GitHub repository. So the best way to register such projects as a Bower package seems to be to use these attachments; instead of a separate repository like suggested here. But it seems this is currently not possible. Am I right?

Was it helpful?

Solution

Bower currently looks for tarballs associated with git tags on github. Logic is here: https://github.com/bower/bower/blob/master/lib/core/resolvers/GitHubResolver.js

@apatrick is correct, currently best practice is to either have a /dist folder or have a separate shim repo like this: https://github.com/angular/bower-angular

Using github releases isn't such a bad idea in my opinion. It's been discussed before. Reason for not implementing is here: https://github.com/bower/bower/issues/584#issuecomment-20456122

If you feel strongly about it, please ask the contributors to repon the ticket.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top