当我通过以下方式从 git repo 安装库时:
bower install git@github.com:fabiantheblind/p5.js.git --save
该组件被克隆到我的
bower_components
中但没有bower.json
在文件夹中。只是一个 .bower.json
.为什么会这样,我该如何解决?
我也得到输出:
bower invalid-meta p5.js is missing "main" entry in bower.json
bower invalid-meta p5.js is missing "ignore" entry in bower.json
但是条目在那里。
(最终目标是使用 grunt-wiredep 自动安装依赖项。See my open issue here)
最佳答案
好的。经过一番折腾,我得到了答案:
我的 repo 克隆有 bower.json 但我没有为它创建标签。所以 bower 仍在查看最新的标签 0.3.6,其中没有 bower.json 存在。
通过创建标签 0.3.7,问题就解决了。
关于bower - 为什么 bower 安装 github/repo 不会克隆我的 bower.json?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25864095/