diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index 9db63ad..1fa7189 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -212,8 +212,8 @@ public function buildByExtension($extension) { * editor.library.yml for an example. Every library must have at least one js * or css entry. Each entry starts with a machine name and defines the * following elements: - * - js: A list of Javascript files to include. Each file is keyed by the file - * path. An item can have several attributes (like weight or HTML + * - js: A list of JavaScript files to include. Each file is keyed by the file + * path. An item can have several attributes (like HTML * attributes). For example: * @code * js: @@ -240,21 +240,25 @@ public function buildByExtension($extension) { * component: * css/file.css: {} * @endcode - * Just like with Javascript files, each CSS file is the key of an object - * which can define specific attributes. The format of the file path is the - * same as for the Javascript files. + * Just like with JavaScript files, each CSS file is the key of an object + * that can define specific attributes. The format of the file path is the + * same as for the JavaScript files. * - dependencies: A list of libraries this library depends on. - * - version: If the version key is set to "VERSION", then the value will - * be substituted with the current version of Drupal core. - * - * @todo Document the following keys and their usage: - * - remote - * - license - * - header - * - weight (special rules for JS) - * - type - * - data - * - minified + * - version: The library version. The string "VERSION" can be used to mean + * the current Drupal core version. + * - header: By default, JavaScript files are included in the footer. If the + * script must be included in the header (along with all its dependencies), + * set this to true. Defaults to false. + * - minified: If the file is already minified, set this to true to avoid + * minifying it again. Defaults to false. + * - remote: If the library is a third-party script, this provides the + * repository URL. + * - license: If the remote property is set, the license information is + * required. It has 3 properties: + * - name: The human-readable name of the license. + * - url: The URL of the license file/information for the version of the + * library used. + * - gpl-compatible: A boolean for whether this library is GPL compatible. * * See https://www.drupal.org/node/2274843#define-library for more * information.