【问题标题】:How to specify a particular provider of a bower dependency如何指定 Bower 依赖项的特定提供者
【发布时间】:2016-08-01 20:22:08
【问题描述】:

我想使用来自 bower 的 angular-cookies,但是当我这样做时:

bower install angular-cookies 它有时会获取the one published by the angular team,有时会获取其他一些old incompatible one from an independent author (angularify)

如果我确实设法获得了官方版本,那么每当我再次运行 bower install ... 时,出于某种其他原因,bower 会切换我已经拥有的 angular-cookies 版本,从而破坏我的应用。

我该怎么做:

bower install --force https://github.com/angular/bower-angular-cookies

【问题讨论】:

    标签: bower angular-cookies


    【解决方案1】:

    正如doc 指定的那样 - 您可以添加如下内容:

    "dependencies": {
       "angular-cookies": "git://github.com/angular/bower-angular-cookies"
    }
    

    这将导致 bower 从您想要的 git 存储库中获取依赖项。您还可以使用git://github.com/angular/bower-angular-cookies#branch_namegit://github.com/angular/bower-angular-cookies#tag_name 指定特定的分支或标签。

    也可以查看question

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-21
      • 1970-01-01
      • 2021-09-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多