0

For contributed Drupal modules, you can check whether you are using the latest version release of the module or not, by using any of the available methods such as Drush, Drupal console, Composer and UI.

What about the libraries used by those modules !?

How do I know if some of the libraries i have on my website are outdated and need to be updated ?!

To name a few, libraries for:

  • Webform.
  • Business Rules.
  • Font Awesome.

Note: I am asking about the libraires used locally and not via CDN.

I am aware of the "one question" policy to simplify the questions asked, but since my other question is related to the first one so:

I don't like to use the CDN version of any library because when switch to the development website on my offline localhost, the CDN won't work and I must anyway to download the Libraires locally on my machine.

So my second question is:

What is the best in term of performance, using the CDN version or the Local version of libraries ?

Maybe, not sure, for development website running on localhost we could use the local version of libraries and add those folders/files to the .gitignore file so they will be not added to the Git repo

Thank you,

  • Read up on the Libraries API module and features it brings to managing 3rd party libraries. As GIT management, that could be its own question. Depending on the size of your dev team, work flow and use of local, dev, stage, prod servers etc… along with other factors there are a few options for overriding gitignore rules. – LittleCoding Sep 15 '18 at 3:02
4

We are using https://asset-packagist.org/ and manage our javascript dependencies just like any other, a composer update keeps those up to date as well then.

https://github.com/drupal-composer/drupal-project/pull/286 is a PR to add that to the drupal-project project by default.

  • Thank you, i will look into that... so you are saying that you use the downloaded version of libraries and not the cdn version !? Have you any particular reason for not using the cdn version ? – Elie Masaad Sep 15 '18 at 12:53
  • @ElieMasaad - Local always better. No extra request, no wait until connection established. From a performance point of perspective go for local. – leymannx Sep 17 '18 at 5:28
  • The argument for CDN is that if many sites use the same CDN, then users would already have those libraries in their cache, and then it could be faster. But I that's not very likely especially when using specific versions. Also in terms of privacy/GDPR, CDN library allow for a certain level of tracking of your users by the CDN provider. – Berdir Sep 17 '18 at 6:03
  • I agree with @leymannx, considering that HTTP/2 is widely available which loads all local resources in one tcp connection. – 4k4 Sep 17 '18 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.