我的bower.json中有几个依赖项,我想将软件包更新到最新版本,所以我运行bower update
并且它不会改变我的bower.json新版本。我也试过bower update signalr --save
但它仍然没有改变bower.json。
为什么?我是否需要手动更改bower.json?如何知道使用的版本?
"dependencies": {
"angular": "~1.4.2",
"angular-bootstrap": "^1.2.5",
"bootstrap": "^3.3.6",
"signalr": "^2.2.0",
"toastr": "^2.1.2",
"angular-i18n": "~1.5.0",
"angular-route": "^1.5.2",
"angular-animate": "^1.5.2",
"angular-cookies": "^1.5.2",
"angular-hotkeys": "cfp-angular-hotkeys#^1.7.0",
"bootswatch": "^3.3.6",
"dirPagination": "^1.0.0"
}
答案 0 :(得分:2)
您可以再次更新bower.json
运行bower install some-package --save
并 选择要从终端升级的 版本,如下所示:
$ bower install signalr --save
bower signalr#* cached https://github.com/SignalR/bower-signalr.git#2.2.1
bower signalr#* validate 2.2.1 against https://github.com/SignalR/bower-signalr.git#*
Unable to find a suitable version for signalr, please choose one by typing one of the numbers below:
1) signalr#2.2.0 which resolved to 2.2.0 and is required by bower-example
2) signalr#^2.2.1 which resolved to 2.2.1
Prefix the choice with ! to persist it to bower.json
? Answer 2
bower signalr#^2.2.1 install signalr#2.2.1
signalr#2.2.1 bower_components/signalr
└── jquery#3.1.1