Installing non-bower-ready library with Bower

做~自己de王妃 提交于 2020-01-16 07:31:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!