We don't need a whole extra module to load the JS file from a default path, how about making the Libraries API module optional?

Comments

lyricnz’s picture

The libraries module allows JS to be installed in a couple of places (eg: profiles, sites/all, sites/DOMAIN), so it offers more flexibility than a hardcoded path. Plus IIRC there's some support for libraries in drupal-make files, which allows for simple download+install. IMHO the 100-line libraries modules is "worth it".

dave reid’s picture

Status: Active » Closed (won't fix)

Agreed, this is a won't fix.

damienmckenna’s picture

Status: Closed (won't fix) » Active

The point is that a) using /sites/all/libraries as a default and b) adding an if() check before using the libraries module results in 80%+ of sites not needing another module. I'll try to do up a patch this week.

dave reid’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.05 KB

Fair point. Please test the following patch.

damienmckenna’s picture

Functionally the patch is fine, but did you mean to remove the $libraries = array(); line?

dave reid’s picture

Yes. It's unnecessary since you can always just start declaring an array. What I'm used to and how most info-type hooks are implemented in core.

jnettik’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Old ticket. Closing.