Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
To avoid other people to lose time adding the libraries with composer, I suggest to add an example of code to copy past into the composer.json of the project the person is working on.
Here is the commit I made for the french Drupal association website: https://github.com/Drupal-FR/site-drupalfr/commit/f9e7a0f1c8674d99c5d8b2...
If you are interested in this idea, I will provide a patch.
And thanks for this module with all those (too many?) features.
Comment | File | Size | Author |
---|---|---|---|
#6 | document_how_to_add_the-2876290-6.patch | 1.16 KB | jrockowitz |
| |||
#4 | document_how_to_add_the-2876290-4.patch | 1.04 KB | jrockowitz |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@Grimreaper I always welcome help with documentation.
Over the past month, I significantly improved the Webform module's library management. There is now a
drush webform-libraries-composer
that generates the Webform module's composer repositories and requirement statements.I think the next step would be to write a drush command that adds these repositories and requirements directly to a website's composer.json. I hesitating doing this because Drupal core needs to decided how best to handler external libraries.
For now I think we should update this documentation which is generated via WebformHelpManager::buildLibraries
Comment #3
GrimreaperHello @jrockowitz,
Thanks for your quick response.
Oh, I didn't know there is a command for that.
To be honest I didn't go to the documentation pages. I only focused on the warnings on the "status report" page. I saw "or use Drush to install this library" (which is broken by the way, at least on 5.0.0-beta12) but I supposed it was one shot installation and not adding the libraries in composer or make.
Maybe just adding "composer and make supported" or something like that would be enough.
I have just tested the composer command. Amazing!!! Very good work. Maybe in the examples it will be good to precise that the output must be redirected to a file "drush wflc > composer.json".
And thanks, I learned something on composer:
I didn't know the option.
I agree that an automatic insertion in a project composer.json would be tricky. Maybe that's too much.
Thanks again for the module.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedHere is a patch that fixes the broken link.
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI fixed the link and patches updating the documentation is welcomed. For now, I am going to close this ticket.
Comment #9
GrimreaperOk. Thanks for the discussion.
Comment #11
ressa CreditAttribution: ressa at Ardea commented@jrockowitz: I just want to thank you for making the download of external libraries so painless, with
drush webform-libraries-download
. It seems like almost everything has been thought of for this module -- small details like including a new field automatically in the results page, as a sortable column. Webform is truly a module done right.Comment #12
selinav CreditAttribution: selinav commentedI can't installed drush on windows, what is the command line with composer to install third libraries?
Comment #13
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedUse `drush --filter=webform help` to see all available webform drush commands. You should use `webform-composer-update` to update your composer.json file.