问题
I am using Bower (http://bower.io/) to manage my app's third-party libraries and now I want to use a library which doesn't have a registered bower package, namely jquery.cloudinary.js
from Cloudinary (http://cloudinary.com).
I would really love to include cloudinary amongst my bower-managed libraries because it really helps cloning my development environment when I need to.
Is it possible to install any library available in the internet with Bower by just editing my bower.json
file? If so, how?
I guess I could either ask Cloudinary to create and register a Bower package or do it myself but I am still in doubt whether I should do any of these.
回答1:
Register it or install with the git url directly: bower install http://website.com/repo.git
From the Bower readme:
Bower offers several ways to install packages:
Using a local or remote package
bower install <package>
Where
<package>
can be any one of the following:A name that maps to a package registered with Bower, e.g, jquery. ‡
A remote Git endpoint, e.g., git://github.com/someone/some-package.git. Can be public or private. ‡
A local endpoint, i.e., a folder that's a Git repository. ‡
A shorthand endpoint, e.g., someone/some-package (defaults to GitHub). ‡
A URL to a file, including zip and tar files. Its contents will be extracted.
来源:https://stackoverflow.com/questions/19796401/installing-non-bower-ready-library-with-bower