[英]Chrome Dev Editor Bower.json And Jquery
I am working on using Chrome Dev Editor. 我正在使用Chrome开发编辑器。 I am not really sure what I am doing wrong in getting jquery to be included in the bower.json.
我不确定在将jquery包含在bower.json中时我做错了什么。 All docs I have seen talk about calling bower install from the command line or to just include in the dependencies section in the bower.json something like:
我见过的所有文档都涉及从命令行调用bower install或仅在bower.json的dependencies部分中包含以下内容:
"jquery": "~1.8.3"
That has no affect that I can see (no new folder in bower_components or error messages). 我看不到有任何影响(bower_components中没有新文件夹或错误消息)。
If I change this to: 如果我将其更改为:
"jquery": "jquery/jquery"
Then I get the jquery folder in the components with the entirety of the jquery git branch. 然后,我将在组件的jquery文件夹中找到整个jQuery git分支。 But, no jquery.min.js to actually use.
但是,没有实际使用的jquery.min.js。
What am I doing wrong? 我在做什么错?
First, git clone jquery/jquery.git 首先,git clone jquery / jquery.git
then drag and drop the src folder from the newly copied repo to the bower_components
folder of your project. 然后将src文件夹从新复制的
bower_components
到项目的bower_components
文件夹中。 then go to your bower.json
file an in the dependencies add 然后转到您的
bower.json
文件并在依赖项中添加
"jquery":"jquery/jquery#master"
then in your project, add 然后在您的项目中添加
<script src="bower_components/src/jquery.js"></script>
It should work! 它应该工作!
Just clone the repository, right click the repository in the File View panel (projects panel), then click click bower install. 只需克隆存储库,右键单击“文件视图”面板(项目面板)中的存储库,然后单击“ bower安装”即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.