问题描述
我正在下载带有凉亭的有角度的,角度引导的和自举的。 Bootstrap依赖于在过程中安装的jquery。但是我在项目中不需要它,因为我仅使用bootstrap的CSS。
I am downloading angular, angular-bootstrap and bootstrap with bower. Bootstrap has a dependency on jquery which is installed in the process. But i don't need it in my project as i am only using bootstrap's css.
所以我尝试使用
bower uninstall jquery --save
正在卸载jquery,但是下次我做 bower更新
,它将再次下载。
It's uninstalling jquery, but the next time i make bower update
, it's downloaded again.
有没有办法告诉Bower永久跳过依赖项?
Is there a way to tell bower to permanently skip a dependency ?
编辑:我希望有一些东西像这样:
edit: I wish there was something like this:
"resolutions": {
"jquery": "no, thanks"
}
推荐答案
为此功能添加了官方支持,并且存在于Bower版本1.6.3和更高版本中。使用 bower -v
检查版本,然后运行 npm install -g bower
进行升级。
Pull request #1394 added official support for this feature and is present in bower version 1.6.3 and later. Check your version with bower -v
, and run npm install -g bower
to upgrade.
有关参考,请参见。如果这对您不起作用,请,因为它是一个错误。
For reference, please see the .bowerrc
official specification document. If this doesn't work for you, please file an issue with bower because it is a bug.
我们在 .bowerrc
中像这样使用它,如下所示:
We use it like this in our .bowerrc
such as the following:
{
"ignoredDependencies": [
"bootstrap",
"bootstrap-sass",
"bootstrap-sass-official"
]
}
这篇关于永久忽略凉亭的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!