1

I want to use angular-cookies from bower but when I do:

bower install angular-cookies it sometimes fetches the one published by the angular team and sometimes some other old incompatible one from an independent author (angularify)

If I do manage to get the official one, then whenever I run bower install ... again, for some other reason, bower will switch the version of angular-cookies that I already have, breaking my application.

How can I do something like:

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

4

1 に答える 1

1

ドキュメントで指定されているように、次のようなものを追加できます。

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

これにより、bower は必要な git リポジトリから依存関係を取得します。git://github.com/angular/bower-angular-cookies#branch_nameまたはを使用git://github.com/angular/bower-angular-cookies#tag_nameして、特定のブランチまたはタグを指定することもできます。

この質問 も参照してください。

于 2016-04-12T06:49:18.903 に答える