Problem/Motivation

Using bower to download required libraries and then copy them to the site's library directory is clumsy. It also creates an issue when different versions of the libraries are released.

Proposed resolution

Add libraries as composer requirements in composer.json.

Remaining tasks

Ammend documentation to include information about installing with composer.
Confirm what versions of superfish, hammer.js, and mmenu are preferred.

User interface changes

None

API changes

Node

Data model changes

None

Comments

grshane created an issue. See original summary.

grshane’s picture

I will gladly submit a patch for this.

tanc’s picture

Thanks @grshane looking forward to a patch.

At the moment my understanding is that it is not possible to specify a libraries directory from a module supplied composer.json file but maybe that has changed recently. One could specific directories to install into from the project's (not module's) composer.json however.

shubham_narlawar’s picture

As Superfish plugin has no dependencies, superfish plugin will be compatible with jQuery v.17.

grshane’s picture

I read through those two issues. I have not tried to do this inside of a module, but wouldn't using extras in composer.json allow you to define where libraries should be saved. This is what I am doing for my workaround, but in my site's composer.json.

tanc’s picture

Status: Active » Postponed

Yes, its not really a workaround as I understand it, but the way you should manage your libraries if you want to do it with composer (debatable whether composer should be used for js). So maybe some documentation about managing libraries with your site composer.json would be good but its not really up to this module to tell people how to manage their libraries.

Using extras inside a module does not work in the same way that your site's composer.json does, as far as I recall. Other module devs have been struggling with this problem and basically the conclusion is that it should be up to you as a developer to decide how you want to install 3rd party javascript libraries. If you do have a crack at this and get it working please let me know. Otherwise I'll mark this as won't fix in the coming days (when I remember!).

tanc’s picture

Status: Postponed » Closed (outdated)

This is still an unsolved issue as far as I'm aware and as there are two methods to install the libraries (manual, npm) in the README.md I'm going to close this as outdated. If this problem gets solved and there is a recommended approach to 3rd party libraries in the future I'll create a new issue.