With the use of yml files within Drupal it would be good if we can start using this as well.
I know that the current *.libraries.info is limited, but being able to extend it to maybe event replace the hook_library_info() with the libraries.yml file.
With this I could event see that we could depreciate the hook_library_info().
I think the new yaml file will look something like
library:
library-1:
title: 'Library One'
website: 'http://example.com/library-1'
version: 1.2
js:
library-1.js:
css:
library-2.css:
type:'file'
media: 'screen'
not sure if this would be quite right, but is an example of this.
Also as an added advantage, what would also be great is being able to use the built in PSR-0 class loader to load PSR-0 compatible libraries without any additional code would make implementing external libraries into Drupal much easier for other modules.
Comment | File | Size | Author |
---|---|---|---|
#1 | 0001-Issue-2058379-by-gordon-Added-Change-.libraries.info.patch | 1.15 KB | gordon |
Comments
Comment #1
gordon CreditAttribution: gordon commentedI have renamed this to libraries.info.yml which is inline with the info files.
Comment #3
tstoecklerSeems you already fixed that in #2058371: Upgrade Libraries API to 8.x which I'm about to commit. :-)
Still, thanks very much!
Comment #3.0
tstoecklerAdd PSR-0 information