通过bower安装jQuery-Mobile [英] Installing jQuery-Mobile via bower
问题描述
在我使用它之前,我必须运行 npm install
和 grunt
随后在 bower_components / jquery-mobile
之内,我可以使用缩小的 .js
和 .css
文件。
这非常单调乏味如果我必须为我使用的每个库执行此操作,我想我会后退到只下载文件并将它们添加到我的项目。
那么有没有更优雅的方式来通过鲍尔依赖关系到那些最终文件?
我的 bower.json
dependencies:{
...
jquery-mobile:latest,
}
必须运行npm / grunt过程(或不)取决于每个作者。在jQuery Mobile的情况下,可能有些外部用户已经注册了它,但没有注意到它需要运行Grunt任务;不幸的是,Bower允许每个人都注册软件包(是坏的还是好的?:S)。
另外,可能存在一些Grunt任务要安装凉亭依赖并且运行他们的Grunt任务;如果没有,创建一个并不复杂。
无论如何,因为您似乎对这些最终的编译文件匆忙有几个小时前已经创建并注册到Bower的 jquery-mobile-bower 。
bower install jquery-mobile-bower
让我们只希望它保持不变并且是最新的。
In my project I would like to use jquery-mobile via bower.
Before I can use it I have to run npm install
and grunt
subsequently inside of bower_components/jquery-mobile
before I can use the minified .js
and .css
files.
This is quite tedious and if I had to do this for every library that I use, I guess I would fallback to just downlading the files and add them to my project.
So is there a more elegant way to get to those "final" files via bower dependency?
My bower.json
"dependencies": {
...
"jquery-mobile": "latest",
}
The fact of having to run npm/grunt process (or not) is up to each author. In the case of jQuery Mobile, probably some external user has registered it without noticing that it needs to run Grunt tasks; Bower unfortunately allows everyone to register packages (is that bad or good? :S).
Also, there may exist some Grunt task to install bower dependencies and run their Grunt tasks aswell; if there aren't, it's not too complicated to create one.
Anyway, as it seems that you're in a "hurry" for those final, compiled files, there is jquery-mobile-bower, which has been created and registered into Bower a few hours ago.
bower install jquery-mobile-bower
Let's just hope that this gets maintained and up-to-date.
这篇关于通过bower安装jQuery-Mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!