Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
103 stars 71 forks source link

Deploy openseadragon js with composer #1518

Closed dannylamb closed 3 years ago

dannylamb commented 4 years ago

Openseadragon can be installed with npm, so it should be available to composer. We can use this to keep the version of openseadragon consistent and also streamline installation. One less thing...

dannylamb commented 4 years ago

Looks like there's no real consensus on how to do this within the Drupal community, with the leading technique involving modifying your site's root composer file. It may be best to hold off for a while until this sorts itself out.

I am looking to update the install location to the standard web/libraries folder, though, just so we don't have to stick things in web/sites/all/vendor/assets, which is causing some minor problems in ISLE.

dannylamb commented 4 years ago

Wound up pulling it from a CDN. Way simpler and still lets us manage the version of the library within the module.

DiegoPino commented 4 years ago

We have been doing this for every JS for more 2 years already and no larger issue on production.

See https://github.com/esmero/format_strawberryfield/blob/8.x-1.0-beta3/format_strawberryfield.libraries.yml

A few notes:

dannylamb commented 4 years ago

Good to hear you haven't had many problems with it (other than of course if the CDN goes down).

I did a quick googling and found the license to be gpl compatible, but it was hasty. I'll double check that. Thanks for the heads up.

mjordan commented 4 years ago

I was involved recently in troubleshooting https://github.com/Islandora-Labs/islandora_usage_stats_charts/issues/28, and the solution was to move the Chart.js Javascript library from a CDN (cloudflare) to a local copy. I never figured out why the CDN version stopped working, but perhaps @bondjimbond can offer some info if he has any. Best guess is that some caching he or his support vendor had implemented interfered, but that's just a guess.