The Libraries API module for some time now is evolving to the standard way of including 3rd party libraries support. It has a lot of very useful features, but in our case we would mostly benefit from:
- The same library can be shared by more than one module/site. (hoverIntent in our case)
- Ease the process of upgrading a module that requires an external library. Just replace the module folder with the new one. No need to move the contained library out and back in (also see #1411250: Upgrade included hoverIntent library to r7 (currently shipping r5)).
I'm not suggesting to completely remove the included libraries we currently ship (these can be left in order to provide an out-of-the-box experience). All I'm saying is that we should allow included libraries' versions to be overridden by any available under /sites/all/libraries.
Thanx for considering this.
Comments
Comment #1
vordude commentedI'm not seeing a huge benefit here. Sorry, I haven't had any of the Libraries Kool-aide, If others had a strong argument, I'm still willing to hear it.
Comment #2
vordude commentedComment #3
elBradford commentedThis module isn't the only module a user might be using that will be using superfish or hoverintent js libraries. Allowing the library version to override local copies would ensure that the js isn't loaded multiple times. That's a big potential problem. As it is, I'm going to switch to the Superfish module since it utilizes the Library API. It's pretty obvious IMO.
Comment #4
xiukun.zhou commentedthis problem already fix in 7.x-2.3 #http://drupal.org/node/1608510#
Comment #5
xiukun.zhou commentedthis problem already fix in 7.x-2.3 [http://drupal.org/node/1608510]
Comment #6
xiukun.zhou commentedthis problem already fix in 7.x-2.3 #1608510: Remove all drupal_add_js with hook_libraries
Comment #7
klonos...Sorry but I fail to see how this is fixed. Supporting the Libraries API module means that a user can simply download a fresh copy of a required library under /sites/all/libraries and that version will be detected and used automatically.
I've installed and enabled the module. Then downloaded the latest v7 of hoverIntent and tried placing it under my /sites/all/libraries/hoverIntent/jquery.hoverIntent.minified.js. I also downloaded the latest 1.7.2 of superfish and placed it under /sites/all/libraries/superfish/superfish.js
Cleared caches to make sure that no cached file is used and checked which versions of the libraries are loaded. It still loads hoverIntent v5 and superfish 1.4.8 from the modules directory. It should instead load the new ones I've added under /sites/all/libraries.
Comment #8
klonosThis is fixed in latest dev. Thanx!
Yay!!!
Comment #9
klonos...actually, lets document this in the README.txt:
PS: perhaps an update of both the CHANGELOG.txt as well as the UPGRADE.txt are in order.
Comment #10
astonvictor commentedI'm closing it because the issue was created a long time ago without any further steps.
if you still need it then raise a new one.
thanks