how to properly register a github fork with Bower

痴心易碎 提交于 2019-12-02 19:11:26

You don't need to create a new repository. A fork will work fine.

But you can't overload on someone else's registered package name with bower. It does look like you've changed the name from onepage-scroll to onepage-scroll-extended though.

If you want to figure out what Bower knows about your package:

Do: bower info onepage-scroll-extended

{
  name: 'onepage-scroll-extended',
  homepage: 'https://github.com/itd24/onepage-scroll-extended',
  version: '1.1.1'
}

Available versions:
  - 1.1.1
  - 1.0.1

Here you can see that it does not have the full bower.json manifest information and the latest information that it has is for version 1.1.1 (not 1.1.3, your latest).

This is because you don't have a v1.1.3 tag in your repository's master branch. I can see a v1.1.1 and v1.2 tag, but no v1.1.3 tag. Create that tag and push it up to GitHub to enable you to bower install that new version.

You may also need to re-run the bower register command to tell it to pick up the latest manifest. This should be happening automatically (AFAIK). You don't include the bower register command that you ran, perhaps you used the wrong repo URL there. You should use something like:

bower register onepage-scroll-extended git@github.com:itd24/onepage-scroll-extended.git

Alain Beauvois

This worked for me :

  1. Fork the repository
  2. Clone on your disk
  3. Increment the version number in bower.json (ex. 2.0.1)
  4. Commit and push
  5. Create a new version tag higher than the forked repository. ex: git tag "2.0.1"
  6. Push : git push --tag
  7. bower install "https://github.com/myname/forkedrepo.git#2.0.1"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!