Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 302834

Add a libraries folder with a README.txt in it to DRUPAL_ROOT

$
0
0

The addition of a /libraries folder (like /modules and /themes) for the purpose of contrib. and project specific custom modules to place shareable javascript or css libraries that should not be included in a module or theme repos due to licensing restrictions and policies of Drupal; is necessary.

In light of 3rd party libraries and content on Drupal.org module and theme developers need a location to instruct Site Builders to download and install said library to.

README should contain:

  • why this is folder is here
  • notes/links on use of *.libraries.yml file in module/theme to access said library.
  • For modules: and installation process points with hook_install (*.install file) and use of hook_requirements($phase) to check the 'install' phase -- demo code
  • extended use with Libraries API 3.x -- hook_library_info()

Viewing all articles
Browse latest Browse all 302834

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>