TheaterGirl62
TheaterGirl62

Reputation: 23

How to customize a Bower package locally?

So if i’m using a Bower package (specifically, this one: https://github.com/DmitryBaranovskiy/raphael/ ) and there’s a tiny bug in it. It’s not really a big deal, and there’s a PR for it: https://github.com/DmitryBaranovskiy/raphael/pull/645 but it seems like the PR won't be merged anytime soon... Is there a way to incorporate this fix into (at least) my local version of the package without theoretically losing all the Bower-goodness? I’m a Bower newbie. I guess I’m asking is there a way to ‘customize’ a Bower package?

(For context, I’m using Bower hooked into the Rails asset pipeline as described here: http://dotwell.io/taking-advantage-of-bower-in-your-rails-4-app/ )

Thanks!

Upvotes: 0

Views: 36

Answers (1)

Nick Tomlin
Nick Tomlin

Reputation: 29271

I feel your pain in regards to pull-requested patches :) Unfortunately, there's not really a clean way to do this.

One way to do this would be to:

  1. Fork Raphel
  2. Incorporate the fix you need
  3. Update your bower.json to point raphel to your personal github fork"raphael": "yourusername/rapheal#branch_name"
  4. Switch back to the "cannonical" raphel once the fix is merged

Edit

My original answer was given without realizing the original PR was 3 years old. I've updated to advocate for forking Raphel.

Upvotes: 1

Related Questions