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.
We should make it easy for people to download libraries!
Comment | File | Size | Author |
---|---|---|---|
#24 | jquery-ui-drush-dl-673492-24.patch | 2.27 KB | shark |
#23 | jquery-ui-drush-dl-673492-23.patch | 2.51 KB | zany |
#13 | jquery-ui-drush-dl-673492-13.patch | 2.36 KB | watcha |
#8 | jquery-ui-drush-dl-673492-7.patch | 1.38 KB | watcha |
#7 | jquery_ui-drush.patch | 1.38 KB | watcha |
Comments
Comment #1
Dave ReidPatch with a 'jqueryui download' command and also runs that command whenever someone calls drush enable jquery_ui.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedLooks proper to me. Nice work.
Comment #3
RobLoachHaha, nice.
Comment #4
turadg CreditAttribution: turadg commentedThanks for this. I just ran it with the HEAD of Drush and got this error:
It's a one character fix. After doing that it downloads, but to sites/all/libraries. The JQuery UI module won't find it there until #489140: Libraries API is resolved. For now I just moved it under /sites/all/modules/jquery_ui/ per the README.
Comment #5
dawehnerHere is a updated patch for it. This fixes the drush-3 problems described above
Comment #6
j0nathan CreditAttribution: j0nathan commentedSubscribing.
Comment #7
watcha CreditAttribution: watcha commentedJust a small correction on #5, gets rid of "WD php: Undefined offset: 0 in /var/www/d6/sites/all/modules/jquery_ui/jquery_ui.drush.inc on line 22." error.
Comment #8
watcha CreditAttribution: watcha commentedSorry, same patch, just named it properly
Comment #9
watcha CreditAttribution: watcha commentedWorks as expected. one can stipulate download destination with an argument. Setting this to Reviewed and tested.
Comment #10
j0nathan CreditAttribution: j0nathan commentedHi,
Would it be possible to choose version 1.7.3 ?
Comment #11
drewish CreditAttribution: drewish commentedYeah +1 for making the version configurable.
Comment #12
drewish CreditAttribution: drewish commentedTaking a hint from #608282: Tell users to delete 'demos' directory in readme we should probably delete the demos folder for them.
Comment #13
watcha CreditAttribution: watcha commentedUpdated patch adds documentation for the drush command to README.txt and allows version configurable downloads of Jquery ui.
I have ignored the request to delete the download folder, as a line in README.txt is more than sufficient. I dont believe the demo's folder should be removed unless the user wants to.
I added my thoughts to #608282: Tell users to delete 'demos' directory in readme
Comment #14
watcha CreditAttribution: watcha commentedComment #15
dman CreditAttribution: dman commentedNice.
Because I couldn't pm-enable it until the library was available, and because jquery_ui.drush wouldn't (seem to) be available until the module was enabled, I had to add a --include path to make it work.
So ... close but ... ?
I guess the issue in #4 is still outstanding before this will work out-of-the box.
The download does what is needed though!!
Comment #16
watcha CreditAttribution: watcha commentedThe patch also adds some information to the README.
The drush command accepts 2 arguments: version and path. These args default to "1.6" and "./sites/all/libraries/jquery.ui"
The reason I let it default to the libraries folder is because hopefully the libraries api patch wont take too long.
So the command as it stands now should be typed "drush jqueryui-download 1.6 ./sites/all/modules/jquery_ui/jquery.ui" as the README states.
EDIT: Thats why jquery_ui wouldnt enable. It wasn't finding jquery ui library where it should be, in .sites/all/modules/jquery_ui/jquery.ui
Is there any chance a maintainer can pop in and leave a comment ? would be much appreciated
Comment #17
dman CreditAttribution: dman commentedConfirmed and understood. I agree that the libraries folder is the best default, even though not automatically used just yet. Keep it like that
All nice and as it should be
Comment #18
YesCT CreditAttribution: YesCT commentedI'm trying the patch in #13.
I think I'm not understanding drush or not understanding patching drush...
first I tried to patch drush, but the readme hunk failed.
then I figured: oh! patch jquery.
That went better.
Then I did:
drush jqueryui-download 1.6 ./sites/all/modules/jquery_ui/jquery.ui
and got an error.
Here is a transcript. What should I do different?
Comment #19
watcha CreditAttribution: watcha commenteddrush -v jqueryui-download 1.6 ./sites/all/modules/jquery_ui/jquery.ui
Can you paste the output of the above ?
Comment #20
YesCT CreditAttribution: YesCT commentedComment #21
sunDue to #489140: Libraries API, the library should be downloaded into sites/all/libraries/jquery.ui now.
Comment #22
YesCT CreditAttribution: YesCT commentedanyone have an updated patch they can post?
Comment #23
zany CreditAttribution: zany commentedUpdated patch with "svn checkout" changed to "svn export" so no ".svn" directories are created.
Added 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_ROOT, to $items so that it works even without a site or config.
Comment #24
shark CreditAttribution: shark commentedPatch from #23 works, but now that #489140: Libraries API is closed, the README doesn't need this message:
That has been removed in the attached patch (which is identical except for that, and also a trailing space was removed).
I tested this, and it works for downloading jquery_ui 1.6 by default or 1.7.3 with the --version 1.7.3 option.
The only trick is that before the module is enabled the drush command isn't available, so in that case it has to be run with the --include option. For example, from the modules/jquery_ui directory I ran:
drush --include=. jqueryui-download
Comment #25
nod_Might be still relevant but with composer.