我想要安装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最新的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相同)