- πΊπΈUnited States tr Cascadia
I think it would be more useful to make that command part of the drush project, not part of votingapi_widgets.
The reason is that Drupal now pretty much requires Composer, but there are lots of third party libraries used by lots of different modules that aren't available on packagist. The issues we face with installing votingapi_widgets are shared by many modules.
Really, it is Drupal core that needs to provide a better way of supporting these third party libraries. There are many ways this could be done. I personally think that Drupal should allow contributed modules to specify additional repositories in the contributed module composer.json. A drush command could accomplish this as well. But Drupal is sort of half-way into supporting Composer - Drupal makes it difficult to install and support a site without Composer, even though Composer isn't technically "required", but Drupal takes no steps to make it easy to use Composer or to provide support for Composer.
Bottom line, I think trying to solve this problem in contributed modules is the wrong place because it potentially affects all contributed modules.
- π©π°Denmark ressa Copenhagen
I agree, it would be nice to be able to define all needed assets, such as third party libraries in the contrib module. Currently, it takes a few manual steps by the user, as can be seen in this project, or in Tagify.
Alternatively, Webform offers a Drush command for installing third-party libraries: https://www.drupal.org/docs/contributed-modules/webform/webform-libraries β , but it also requires additional steps, than just running a command.
- πΊπΈUnited States tr Cascadia
Thanks for the Webform link. Yes, something like including Composer Merge in Drupal core would solve this issue for us. Webform, with all its additional libraries, really requires that. But Voting API Widgets just requires adding the one repository - working with Composer Merge like Webform does would make the installation of Voting API Widgets a lot more complicated, not easier. The only way it becomes easier is if Composer Merge was put into core.
- π©π°Denmark ressa Copenhagen
Yes, I do agree that for this module it could be overkill, since only a single is library is downloaded ... Personally I prefer to just do it manually, something like this (not verified).
mkdir -p web/libraries/ cd web/libraries/ wget https://github.com/antennaio/jquery-bar-rating/archive/v1.2.2.zip unzip v1.2.2.zip mv jquery-bar-rating-1.2.2/ jquery-bar-rating
I just checked, and Composer Merge actually used to be in Drupal core π Remove wikimedia/composer-merge-plugin Fixed , so maybe unlikely to make a come back?
... and by the way, a big thank you to both of you (@ipwa and @TR) and the rest of the maintainers for working on the module. I hope it gets Drupal 10 ready at some point and I see there is quite a bit of activity in π [9.2] Remove jQuery dependency from the once feature RTBC , so maybe it'll happen before too long?