componentjs/component

component {fork,unfork} <component>

johntron opened this issue · 2 comments

I've been working on an enterprise webapp that's used component for about 1.5 years now. I've had to patch 4 or 5 public components to apply fixes or add minor functionality. The process goes like this:

  1. Fork public repo
  2. Update dependent components to use forked repo
  3. Build (installs forked copy)
  4. Replace forked component installed by component with a git clone
  5. Apply changes, build, test, push, create PR
  6. Update dependent components from step 2 to use the latest commit hash from the forked copy
  7. Wait for upstream to merge PR and bump version
  8. Revert dependent components from step 2 to use new upstream version

Maybe there's an easier way, but it would be nice if component helped out here like so:

  • component fork <original-component> that would perform 1-4 (somehow remember the upstream copy)
  • component use-fork <original> <forked-component> for step 6
  • component unfork <original-or-new> for step 8.

Maybe also a list of forked components when component fork is used without a component.

yes, it's really a pain, but I don't think it belongs to component.
It could be a feature of https://github.com/tj/git-extras

Just for reference and maybe as an interest implementation, I use hub fork from github:

https://github.com/github/hub#git-fork

It might be of interest to check how they do it.