【发布时间】:2014-12-04 19:36:13
【问题描述】:
我想安装modernizr:
bower install modernizr
一切看起来都还不错,但是当我在 bower_components/modernizr 中查看时,我在任何地方(甚至没有子目录)都看不到modernizr.js 或任何包含modernizr.js 内容的文件......
如果我安装 jQuery,类似的注释
bower install jquery
bower “说”它已经安装了 jQuery 2.1.1,但我在任何地方都找不到它。 'dist' 目录只有 jquery.min.map
如果我需要 jQuery latest 1.X
bower install jquery#^1
我进入 dist jquery.js 等
我为什么要经历这一切?因为本来想安装yeoman webapp
yo webapp
然后继续选择所有内容(sass、bootstrap 和modernizr)。但是当我去运行它时
grunt serve
我知道了:
Running "serve" task
Running "clean:server" (clean) task
>> 0 paths cleaned.
Running "wiredep:app" (wiredep) task
app/index.html modified.
modernizr was not injected in your file.
Please go take a look in "C:\mobapps_html5\Working\bower_components\modernizr" f
or the file you need, then manually include it in your file.
Running "wiredep:sass" (wiredep) task
app/styles/main.scss modified.
modernizr was not injected in your file.
Please go take a look in "C:\mobapps_html5\Working\bower_components\modernizr" f
or the file you need, then manually include it in your file.
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Done, without errors.
Running "sass:server" (sass) task
File .tmp/styles/main.css created.
File .tmp/styles/main.css.map created.
Done, without errors.
Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/main.css created.
Running "connect:livereload" (connect) task
Started connect web server on http://localhost:9000
Running "watch" task
Waiting...
Modernizr 没有被注入(当然它不存在!!!)并且 jQuery 不起作用(index.html 中的链接指向任何内容...... jquery.js 不存在,与modernizr 相同)
【问题讨论】:
-
@goodMan 认真的吗? “这快把我逼疯了”编辑掉了?好的。无论如何,我找到了答案......我会为后代发布它。大声笑,这让我发疯会更好吗?没关系。
-
一般性的社论,比如情感,都被删掉了,因为它们对任何人都没有帮助,而且掩盖了实际问题。
-
@DreadedMonkey ,编辑是一件好事。这不是惩罚。一段时间后每个人都会遇到同样的问题,最好有清晰的问题和答案。 :)