doulei8861 2015-01-18 12:18
浏览 67
已采纳

哪个包服务为Bower提供存储库?

Behind the dependency manager for PHP Composer works with the PHP package archive service Packagist. So when I want to defind Zend Framework 2 as a package, my project depends on, I use the syntax developer/package:

composer.json

{
    "name": "Project Name",
    "description": "Project Description",
    "require": {
        "php": ">=5.3.23",
        "zendframework/zendframework": ">=2.3.2,<3.0.0",
        ...
    }
    ...
}

Then I run composer install and looks in the Packagist archive for the packges, I defined as dependencies.

Now the Bower:

I can define the dependencies in the bower.json and get them with bower init or load them directly with bower install <package>. In both cases the package can be defined as a GitHub address or any URL (http://sld.tld/file.js), but also in form of developer/package (bower install angular/angular.js) or even just package (bower install jquery).

What is Bower's "Packagist"? Which package service provides the package repository for Bower?

  • 写回答

2条回答 默认 最新

  • doujia4759 2015-01-19 03:57
    关注

    The mapping between the package name and the repository holding the package content is done by the Bower registry.
    By default the Bower client will use the public Bower registry - http://bower.herokuapp.com.
    To register a new package in the registry you need to use the bower register command as described here.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部