在web入门套件上插入jquery [英] Insert jquery on web starter kit

查看:109
本文介绍了在web入门套件上插入jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为产品依赖添加jquery。我已经通过npm命令安装了gulp jquery。如何在我的索引html文件中插入脚本?



但是当我运行命令 gulp serve:dist 时,它不是在脚本文件夹或甚至在我的项目文件中显示。



解决方案

gulp-jquery 并不意味着将jQuery安装到您的项目依赖项中,而是要构建可用于构建的jQuery的子集。如何做到这一点可以在这个插件的文档中找到。



使用web入门套件,您不能只依赖项目连接,您必须手动添加。



安装jQuery的最佳方式:通过npm(npm install --save jquery)或bower(bower install --save jquery)安装。

I want to add jquery for product dependency. I have already install gulp jquery via npm command. How to insert script in my index html file?

But when I have run command gulp serve:dist it's not showing on scripts folder or even in my project files.

解决方案

gulp-jquery is not meant to install jQuery to your project dependencies, but meant to build a subset of jQuery which you can use for your build. How this can be achieved is in the docs of this plugin.

With the web starter kit, you can't just wire up dependencies to your project, you would have to add the manually.

Best way to install jQuery: Either via npm (npm install --save jquery) or bower (bower install --save jquery).

这篇关于在web入门套件上插入jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆