2
我有一個git項目,其中包含一個bower.json文件,其中包含幾個依賴項。它看起來像這樣:安裝鮑爾依賴不是最新的提交
//module1
"dependencies": {
"devbridge-autocomplete": "devbridge/jQuery-Autocomplete#~1.2.21",
"backbone": "~1.2.1",
"underscore": "~1.8.3",
"jquery": "~2.1.4",
"module2": "gitUser/module2",
"module3": "gitUser/module3"
}
問題是,當我運行bower install --save gitUser/module1
亭子不從GitHub拉最新的提交,只有拉初始提交。
bower.json模塊2和3本質上是相似的:
{
"name": "module2",
"main": "module2.js",
"version": "0.0.0",
"authors": [
"gitUser <[email protected]>"
],
"moduleType": [
"amd"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"directory/bower_components",
"test",
"tests"
]
}
克隆庫藏.bower.json樣子:
{
"name": "module2",
"_cacheHeaders": {
"Content-Type": "text/html; charset=utf-8"
},
"main": "index",
"_source": "https://github.com/gitUser/module2",
"_target": "*",
"_originalSource": "https://github.com/gitUser/module2"
}
我也失敗嘗試安裝依賴於模塊1通過:
bower install --save gitUser/module2#latest
我也嘗試添加git標籤到每個子模塊,但這也沒有奏效。 我看到this問題,所以標記應該沒有關係。
任何援助讚賞!
你有GitHub上做了一個「放」的模塊1? –
我曾希望避免發佈。我想我試圖使用bower作爲依賴管理器和一種方式來管理我的git工作流的一些子模塊,這些模塊是依賴關係,但也在開發中。關於上述問題,多次卸載依賴關係和清除緩存似乎最終會使其工作,儘管問題仍然會一直髮生。我將排除故障併發布我的解決方案。 – andrsnn
設置代碼與bower一起工作的說明確實表明您需要在GitHub上創建一個「發佈」,這就是它如何跟蹤您正在使用的版本等。 –