gpt4 book ai didi

node.js - bower 安装 modernizr...modernizr.js 在哪里?

转载 作者:搜寻专家 更新时间:2023-10-31 23:02:06 26 4
gpt4 key购买 nike

我想这样安装 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 没有被注入(inject)(当然它不存在!!!)并且 jQuery 不起作用(index.html 中的链接指向任何内容......jquery.js 不存在,与 modernizr 相同)

最佳答案

当您从 bower 获取 modernizr 时,您需要转到下载 modernizr 的目录并运行 npm install。完成后,运行 grunt test,grunt 将在 modernizr 文件夹中创建一个 dist,其中包含一个 modernizr-build.js 文件。

关于node.js - bower 安装 modernizr...modernizr.js 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27302498/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com