Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing jQuery-Mobile via 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",
}
like image 541
Besi Avatar asked Jul 18 '13 15:07

Besi


People also ask

How to install jQuery using Bower?

Libraries are downloaded with Bower using the bower install command. To install jQuery UI, run bower install jquery-ui . Doing so creates the following (simplified) directory structure. Note: If you get an error that the bower command is not found, check out Bower's installation instructions.

Is jQuery Mobile still used?

The team announced that the cross-platform jQuery Mobile project under its umbrella is fully deprecated as of October 7, 2021. New technologies for mobile app development have evolved since this project was launched in 2010, so we're encouraging developers to plan for this jQuery Mobile transition.

Is jQuery Mobile open source?

Features of jQuery Mobile: It is open-source and a cross-platform-compatible framework.

What is jQuery Mobile framework?

The framework allows developers to build applications that can be accessed by the widest number of browsers and devices, whether it is Internet Explorer 6 or the newest Android or iPhone. Mobile jQuery also gives developers the ability to render basic content (as built) on basic devices.


1 Answers

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.

like image 118
gustavohenke Avatar answered Sep 29 '22 12:09

gustavohenke