简体   繁体   English

使用Bower安装单个插件

[英]Installing individual plugin with bower

I'm looking at the d3-plugins repository and I want to install only the horizon chart plugin. 我正在看d3-plugins存储库,我只想安装地平线图插件。

At the moment my bower.json file has this entry: 目前,我的bower.json文件具有以下条目:

"d3-plugins": "*"

But this will install the entire repo containing all the other plugins as well. 但这将安装包含所有其他插件的整个仓库。
Is there a way I can specify bower to install only one subdirectory of a project? 有没有一种方法可以指定Bower仅安装项目的一个子目录?

This is probably not optimal, but you can point bower directly to the horizon.js URL: 这可能不是最佳选择,但是您可以将Bower直接指向horizo​​ntal.js URL:

"dependencies":{
    "d3-plugins-horizon": "https://raw.githubusercontent.com/d3/d3-plugins/master/horizon/horizon.js"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM