rctneil
rctneil

Reputation: 7210

Twitter Bower file choosing

I was just playing about with Bower and got it to pull down jQuery 1.9.1 and Fancybox 2.1.4

That's great but for example, Fancybox pulls it's entire repo down including all the demo files and not just the actual files I need.

How should this situation be dealt with?

Neil

Upvotes: 1

Views: 229

Answers (1)

passy
passy

Reputation: 7211

You have three options at the moment:

  1. Bug the author about either properly using the ignore attribute of the component.json (or soon to be bower.json) or maintaining a separate repository just for bower like AngularJS does for example.
  2. Register and maintain a component yourself.
  3. Pull in just the file you need via HTTP like this:
  "dependencies": {
    "fancybox": "https://raw.github.com/fancyapps/fancyBox/master/source/jquery.fancybox.js"
  }

Last last option comes with the drawbacks that neither dependency resolution nor multiple files will work. The best long-term solution is to lobby the author to correctly support bower.

Upvotes: 3

Related Questions