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上创建一个“发布”,这就是它如何跟踪您正在使用的版本等。 –