简体   繁体   中英

Force bower to clone full git repository

I'm using bower as my dependency manager, and I want to add a git repository as a dependency. I'm already aware of the fact I can do bower install git@github.com:foo/bar.git , however I need to clone the full directory because my dependency is on a source file of the repo.

The files that are missing when using bower are listed as ignored in the repository's bower.json file, the question is then: how can I force bower to clone them even though they're listed as ignored?

I believe you can just have the following to reference a git repo in your bower.json file(assuming you have an SSH key set up, just remove the +ssh if you don't):

"some-dependency-name": "git+ssh://<clone path in github>",

The clone path would be the link you copy/paste when you go to clone the repo, like "git@git.your-organization.com/path/to/gitfile.git"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM