Closed (outdated)
Project:
Responsive and off-canvas menu
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2018 at 15:44 UTC
Updated:
10 Jul 2020 at 16:35 UTC
Jump to comment: Most recent
Comments
Comment #2
grshane commentedI will gladly submit a patch for this.
Comment #3
tancThanks @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.
Comment #4
tancTwo 'heated' discussions about this issue: #2873160: Implement core management of 3rd-party FE libraries and #2605130: Best practices for handling external libraries in Drupal 8/9/10 and 11
Comment #5
shubham_narlawar commentedAs Superfish plugin has no dependencies, superfish plugin will be compatible with jQuery v.17.
Comment #6
grshane commentedI read through those two issues. I have not tried to do this inside of a module, but wouldn't using
extrasin 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.Comment #7
tancYes, 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!).
Comment #8
tancThis 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.