简体   繁体   English

Yeoman Bower两次包含jQuery?

[英]Yeoman Bower including jQuery twice?

I'm using Yeoman for a simple site. 我正在将Yeoman用于一个简单的网站。 When I look at the Resources pane in Chrome, I see jQuery is being included twice (which breaks some needed Bootstrap js) 当我在Chrome中查看“资源”窗格时,我看到jQuery被两次包含(这打破了一些所需的Bootstrap js)

Bower list outputs this: Bower列表输出以下内容:

├─┬ bootstrap#3.0.0
│ └── jquery#1.10.2 (2.0.3 available)
├── jquery#1.10.2 (latest is 2.0.3)
├── modernizr#2.6.2
├── requirejs#2.1.8
└─┬ sass-bootstrap#3.0.0
  └── jquery#1.10.2

I've tried bower uninstall on bootstrap, sass-bootstrap, jquery, doesn't seem to help. 我试过在bootstrap,sass-bootstrap,jquery上进行Bower卸载,似乎没有帮助。

This is completely correct. 这是完全正确的。 Both bootstrap and sass-bootstrap depend on jQuery. bootstrapsass-bootstrap依赖jQuery。 Bower has a flat hierarchy, so there is no duplication and since both require jquery#~1.10 , there isn't even a version conflict. Bower具有平坦的层次结构,因此没有重复,并且由于两者都需要jquery#~1.10 ,因此甚至没有版本冲突。

That said, including both bootstrap and sass-bootstrap doesn't make much sense, because the latter is just the SASS'ified version of the former and thus works as a complete replacement. 也就是说,同时包含bootstrapsass-bootstrap并没有多大意义,因为后者只是前者的SASS'ified版本,因此可以作为完整的替代品。

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

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