diff --git a/core/core.library.yml b/core/core.library.yml index 3a1d0f8..fb60744 100644 --- a/core/core.library.yml +++ b/core/core.library.yml @@ -2,7 +2,7 @@ backbone: remote: https://github.com/jashkenas/backbone version: 1.1.0 js: - - { file: assets/vendor/backbone/backbone.js, weight: -19 } + assets/vendor/backbone/backbone.js: { weight: -19 } dependencies: - core/underscore @@ -12,31 +12,30 @@ ckeditor: version: 4.2-dev commit: 887d81ac1824008b690e439a1b29eb4f13b51212 js: - - { file: assets/vendor/ckeditor/ckeditor.js, preprocess: false } + assets/vendor/ckeditor/ckeditor.js: { preprocess: false } domready: remote: https://github.com/ded/domready # @todo Stable release required for Drupal 8.0. version: master js: - - { file: assets/vendor/domready/ready.min.js, weight: -21 } + assets/vendor/domready/ready.min.js: { weight: -21 } drupal: version: VERSION js: - - { file: misc/drupal.js, weight: -18 } + misc/drupal.js: { weight: -18 } dependencies: - core/domready drupalSettings: version: VERSION - js: - - { settings: { } } + settings: {} drupal.ajax: version: VERSION js: - - { file: misc/ajax.js, weight: 2 } + misc/ajax.js: { weight: 2 } dependencies: - core/jquery - core/drupal @@ -47,7 +46,7 @@ drupal.ajax: drupal.announce: version: VERSION js: - - { file: misc/announce.js } + misc/announce.js: {} dependencies: - core/drupal - core/drupal.debounce @@ -55,7 +54,7 @@ drupal.announce: drupal.autocomplete: version: VERSION js: - - { file: misc/autocomplete.js, weight: -1 } + misc/autocomplete.js: { weight: -1 } dependencies: - core/jquery - core/drupal @@ -66,7 +65,7 @@ drupal.autocomplete: drupal.batch: version: VERSION js: - - { file: misc/batch.js, group: 0, cache: false } + misc/batch.js: { group: 0, cache: false } dependencies: - core/jquery - core/drupal @@ -78,7 +77,7 @@ drupal.batch: drupal.collapse: version: VERSION js: - - { file: misc/collapse.js, group: 0 } + misc/collapse.js: { group: 0 } dependencies: - core/jquery - core/modernizr @@ -89,7 +88,7 @@ drupal.collapse: drupal.debounce: version: VERSION js: - - { file: misc/debounce.js } + misc/debounce.js: {} dependencies: # @todo Remove Drupal dependency. - core/drupal @@ -97,10 +96,10 @@ drupal.debounce: drupal.dialog: version: VERSION js: - - { file: misc/dialog.js } - - { file: misc/dialog.position.js } + misc/dialog.js: {} + misc/dialog.position.js: {} css: - - { file: misc/dialog.theme.css, weight: 1 } + misc/dialog.theme.css: { weight: 1 } dependencies: - core/jquery - core/drupal @@ -112,7 +111,7 @@ drupal.dialog: drupal.dialog.ajax: version: VERSION js: - - { file: misc/dialog.ajax.js, weight: 3 } + misc/dialog.ajax.js: { weight: 3 } dependencies: - core/jquery - core/drupal @@ -123,7 +122,7 @@ drupal.dialog.ajax: drupal.displace: version: VERSION js: - - { file: misc/displace.js } + misc/displace.js: {} dependencies: - core/jquery - core/drupal @@ -132,10 +131,10 @@ drupal.displace: drupal.dropbutton: version: VERSION js: - - { file: misc/dropbutton/dropbutton.js } + misc/dropbutton/dropbutton.js: {} css: - - { file: misc/dropbutton/dropbutton.css } - - { file: misc/dropbutton/dropbutton.theme.css } + misc/dropbutton/dropbutton.css: {} + misc/dropbutton/dropbutton.theme.css: {} dependencies: - core/jquery - core/drupal @@ -145,7 +144,7 @@ drupal.dropbutton: drupal.form: version: VERSION js: - - { file: misc/form.js, weight: 1 } + misc/form.js: { weight: 1 } dependencies: - core/jquery - core/drupal @@ -155,7 +154,7 @@ drupal.form: drupal.machine-name: version: VERSION js: - - { file: misc/machine-name.js } + misc/machine-name.js: {} dependencies: - core/jquery - core/jquery.once @@ -165,7 +164,7 @@ drupal.machine-name: drupal.progress: version: VERSION js: - - { file: misc/progress.js, group: 0 } + misc/progress.js: { group: 0 } dependencies: - core/drupal - core/jquery @@ -174,7 +173,7 @@ drupal.progress: drupal.states: version: VERSION js: - - { file: misc/states.js, weight: 1 } + misc/states.js: { weight: 1 } dependencies: - core/jquery - core/drupal @@ -184,7 +183,7 @@ drupal.states: drupal.tabbingmanager: version: VERSION js: - - { file: misc/tabbingmanager.js } + misc/tabbingmanager.js: {} dependencies: - core/jquery # Supplies the ':tabbable' pseudo selector. @@ -194,7 +193,7 @@ drupal.tabbingmanager: drupal.tabledrag: version: VERSION js: - - { file: misc/tabledrag.js, weight: -1 } + misc/tabledrag.js: { weight: -1 } dependencies: - core/jquery - core/modernizr @@ -206,7 +205,7 @@ drupal.tabledrag: drupal.tableheader: version: VERSION js: - - { file: misc/tableheader.js } + misc/tableheader.js: {} dependencies: - core/jquery - core/drupal @@ -217,7 +216,7 @@ drupal.tableheader: drupal.tableresponsive: version: VERSION js: - - { file: misc/tableresponsive.js } + misc/tableresponsive.js: {} dependencies: - core/jquery - core/drupal @@ -226,7 +225,7 @@ drupal.tableresponsive: drupal.tableselect: version: VERSION js: - - { file: misc/tableselect.js } + misc/tableselect.js: {} dependencies: - core/drupal - core/jquery @@ -234,7 +233,7 @@ drupal.tableselect: drupal.timezone: version: VERSION js: - - { file: misc/timezone.js } + misc/timezone.js: {} dependencies: - core/jquery - core/drupal @@ -242,9 +241,9 @@ drupal.timezone: drupal.vertical-tabs: version: VERSION js: - - { file: misc/vertical-tabs.js } + misc/vertical-tabs.js: {} css: - - { file: misc/vertical-tabs.css } + misc/vertical-tabs.css: {} dependencies: - core/jquery - core/drupal @@ -255,13 +254,13 @@ html5shiv: remote: https://github.com/aFarkas/html5shiv version: 3.6.2 js: - - { file: assets/vendor/html5shiv/html5.js, weight: -22, browsers: { IE: 'lte IE 8', '!IE': false } } + assets/vendor/html5shiv/html5.js: { weight: -22, browsers: { IE: 'lte IE 8', '!IE': false } } jquery: remote: https://github.com/jquery/jquery version: 2.0.3 js: - - { file: assets/vendor/jquery/jquery.js, weight: -20 } + assets/vendor/jquery/jquery.js: { weight: -20 } jquery.cookie: # @todo jquery.cookie.js was never supposed to be distributed with jQuery UI. @@ -269,7 +268,7 @@ jquery.cookie: remote: https://github.com/carhartl/jquery-cookie version: v1.0 js: - - { file: assets/vendor/jquery.ui/external/jquery.cookie.js } + assets/vendor/jquery.ui/external/jquery.cookie.js: {} dependencies: - core/jquery @@ -278,9 +277,9 @@ jquery.farbtastic: # @todo Ping @robloach or @mattfarina to retroactively create this release. version: 1.2 js: - - { file: assets/vendor/farbtastic/farbtastic.js } + assets/vendor/farbtastic/farbtastic.js: {} css: - - { file: assets/vendor/farbtastic/farbtastic.css } + assets/vendor/farbtastic/farbtastic.css: {} dependencies: - core/jquery @@ -288,7 +287,7 @@ jquery.form: remote: https://github.com/malsup/form version: 3.39 js: - - { file: assets/vendor/jquery-form/jquery.form.js } + assets/vendor/jquery-form/jquery.form.js: {} dependencies: - core/jquery - core/jquery.cookie @@ -297,7 +296,7 @@ jquery.once: remote: https://github.com/RobLoach/jquery-once version: 1.2.3 js: - - { file: assets/vendor/jquery-once/jquery.once.js, weight: -19 } + assets/vendor/jquery-once/jquery.once.js: { weight: -19 } dependencies: - core/jquery @@ -305,19 +304,19 @@ jquery.ui: remote: https://github.com/jquery/jquery-ui version: &jquery.ui 1.10.2 js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.core.js, weight: -11 } + assets/vendor/jquery.ui/ui/jquery.ui.core.js: { weight: -11 } css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.core.css } - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.theme.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.core.css: {} + assets/vendor/jquery.ui/themes/base/jquery.ui.theme.css: {} dependencies: - core/jquery jquery.ui.accordion: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.accordion.js } + assets/vendor/jquery.ui/ui/jquery.ui.accordion.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.accordion.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.accordion.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -325,9 +324,9 @@ jquery.ui.accordion: jquery.ui.autocomplete: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.autocomplete.js } + assets/vendor/jquery.ui/ui/jquery.ui.autocomplete.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.autocomplete.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.autocomplete.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -337,9 +336,9 @@ jquery.ui.autocomplete: jquery.ui.button: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.button.js } + assets/vendor/jquery.ui/ui/jquery.ui.button.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.button.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.button.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -347,18 +346,18 @@ jquery.ui.button: jquery.ui.datepicker: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.datepicker.js } + assets/vendor/jquery.ui/ui/jquery.ui.datepicker.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.datepicker.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.datepicker.css: {} dependencies: - core/jquery.ui jquery.ui.dialog: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.dialog.js } + assets/vendor/jquery.ui/ui/jquery.ui.dialog.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.dialog.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.dialog.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -371,7 +370,7 @@ jquery.ui.dialog: jquery.ui.draggable: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.draggable.js } + assets/vendor/jquery.ui/ui/jquery.ui.draggable.js: {} dependencies: - core/jquery.ui - core/jquery.ui.mouse @@ -380,7 +379,7 @@ jquery.ui.draggable: jquery.ui.droppable: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.droppable.js } + assets/vendor/jquery.ui/ui/jquery.ui.droppable.js: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -390,105 +389,105 @@ jquery.ui.droppable: jquery.ui.effects.core: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.core.js, weight: -9 } + assets/vendor/jquery.ui/ui/jquery.effects.core.js: { weight: -9 } jquery.ui.effects.blind: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.blind.js } + assets/vendor/jquery.ui/ui/jquery.effects.blind.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.bounce: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.bounce.js } + assets/vendor/jquery.ui/ui/jquery.effects.bounce.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.clip: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.clip.js } + assets/vendor/jquery.ui/ui/jquery.effects.clip.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.drop: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.drop.js } + assets/vendor/jquery.ui/ui/jquery.effects.drop.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.explode: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.explode.js } + assets/vendor/jquery.ui/ui/jquery.effects.explode.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.fade: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.fade.js } + assets/vendor/jquery.ui/ui/jquery.effects.fade.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.fold: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.fold.js } + assets/vendor/jquery.ui/ui/jquery.effects.fold.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.highlight: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.highlight.js } + assets/vendor/jquery.ui/ui/jquery.effects.highlight.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.pulsate: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.pulsate.js } + assets/vendor/jquery.ui/ui/jquery.effects.pulsate.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.scale: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.scale.js } + assets/vendor/jquery.ui/ui/jquery.effects.scale.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.shake: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.shake.js } + assets/vendor/jquery.ui/ui/jquery.effects.shake.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.slide: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.slide.js } + assets/vendor/jquery.ui/ui/jquery.effects.slide.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.effects.transfer: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.effects.transfer.js } + assets/vendor/jquery.ui/ui/jquery.effects.transfer.js: {} dependencies: - core/jquery.ui.effects.core jquery.ui.menu: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.menu.js } + assets/vendor/jquery.ui/ui/jquery.ui.menu.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.menu.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.menu.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -496,21 +495,21 @@ jquery.ui.menu: jquery.ui.mouse: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.mouse.js } + assets/vendor/jquery.ui/ui/jquery.ui.mouse.js: {} dependencies: - core/jquery.ui.widget jquery.ui.position: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.position.js } + assets/vendor/jquery.ui/ui/jquery.ui.position.js: {} jquery.ui.progressbar: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.progressbar.js } + assets/vendor/jquery.ui/ui/jquery.ui.progressbar.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.progressbar.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.progressbar.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -518,9 +517,9 @@ jquery.ui.progressbar: jquery.ui.resizable: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.resizable.js } + assets/vendor/jquery.ui/ui/jquery.ui.resizable.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.resizable.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.resizable.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -529,9 +528,9 @@ jquery.ui.resizable: jquery.ui.selectable: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.selectable.js } + assets/vendor/jquery.ui/ui/jquery.ui.selectable.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.selectable.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.selectable.css: {} dependencies: - core/jquery.ui - core/jquery.ui.mouse @@ -540,9 +539,9 @@ jquery.ui.selectable: jquery.ui.slider: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.slider.js } + assets/vendor/jquery.ui/ui/jquery.ui.slider.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.slider.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.slider.css: {} dependencies: - core/jquery.ui - core/jquery.ui.mouse @@ -551,7 +550,7 @@ jquery.ui.slider: jquery.ui.sortable: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.sortable.js } + assets/vendor/jquery.ui/ui/jquery.ui.sortable.js: {} dependencies: - core/jquery.ui - core/jquery.ui.mouse @@ -560,7 +559,7 @@ jquery.ui.sortable: jquery.ui.spinner: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.spinner.js } + assets/vendor/jquery.ui/ui/jquery.ui.spinner.js: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -569,9 +568,9 @@ jquery.ui.spinner: jquery.ui.tabs: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.tabs.js } + assets/vendor/jquery.ui/ui/jquery.ui.tabs.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.tabs.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.tabs.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -579,9 +578,9 @@ jquery.ui.tabs: jquery.ui.tooltip: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.tooltip.js } + assets/vendor/jquery.ui/ui/jquery.ui.tooltip.js: {} css: - - { file: assets/vendor/jquery.ui/themes/base/jquery.ui.tooltip.css } + assets/vendor/jquery.ui/themes/base/jquery.ui.tooltip.css: {} dependencies: - core/jquery.ui - core/jquery.ui.widget @@ -591,14 +590,14 @@ jquery.ui.touch-punch: remote: https://github.com/furf/jquery-ui-touch-punch version: 0.2.2 js: - - { file: assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.js } + assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.js: {} dependencies: - core/jquery.ui jquery.ui.widget: version: *jquery.ui js: - - { file: assets/vendor/jquery.ui/ui/jquery.ui.widget.js, weight: -10 } + assets/vendor/jquery.ui/ui/jquery.ui.widget.js: { weight: -10 } dependencies: - core/jquery.ui @@ -608,7 +607,7 @@ matchmedia: # @see http://drupal.org/node/1815602 version: VERSION js: - - { file: misc/matchmedia.js } + misc/matchmedia.js: {} dependencies: - core/drupal.debounce @@ -616,17 +615,17 @@ modernizr: remote: https://github.com/Modernizr/Modernizr version: v2.6.2 js: - - { file: assets/vendor/modernizr/modernizr.min.js, every_page: true, preprocess: 0, scope: header, weight: -21 } + assets/vendor/modernizr/modernizr.min.js: { every_page: true, preprocess: 0, scope: header, weight: -21 } normalize: remote: https://github.com/necolas/normalize.css version: v2.1.2 css: - - { file: assets/vendor/normalize-css/normalize.css, every_page: true, weight: -220 } + assets/vendor/normalize-css/normalize.css: { every_page: true, weight: -220 } underscore: remote: https://github.com/jashkenas/underscore version: 1.5.2 js: - - { file: assets/vendor/underscore/underscore.js, weight: -20 } + assets/vendor/underscore/underscore.js: { weight: -20 } diff --git a/core/includes/common.inc b/core/includes/common.inc index f182416..269bbc0 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2766,8 +2766,8 @@ function drupal_get_library($extension, $name = NULL) { $path = 'core'; } else { - // @todo Add a $type argument OR automatically figure out the type based on - // current extension data, possibly using a module->theme fallback mechanism. + // @todo Add a $type argument OR automatically figure out the type based + // on current extension data, possibly using a module->theme fallback. $path = drupal_get_path('module', $extension); if (!$path) { $path = drupal_get_path('theme', $extension); @@ -2798,48 +2798,57 @@ function drupal_get_library($extension, $name = NULL) { } foreach (array('js', 'css') as $type) { - foreach ($library[$type] as $i => $options) { + foreach ($library[$type] as $source => $options) { + unset($library[$type][$source]); + // Allow to omit the options hashmap in YAML declarations. + if (!is_array($options)) { + $options = array(); + } // Apply the JS_LIBRARY group if it wasn't explicitly set. if (!isset($options['group']) && $type == 'js') { $options['group'] = JS_LIBRARY; } - - if (isset($options['file'])) { + // By default, all library assets are files. + if (!isset($options['type'])) { $options['type'] = 'file'; - if ($options['file'][0] === '/') { - // An absolute path maps to DRUPAL_ROOT. - if ($options['file'][1] !== '/') { - $options['data'] = substr($options['file'], 1); + } + // Determine the file asset URI, unless explicitly marked as external. + if ($options['type'] != 'external') { + if ($source[0] === '/') { + // An absolute path maps to DRUPAL_ROOT / base_path(). + if ($source[1] !== '/') { + $options['data'] = substr($source, 1); } - // A protocol-free URI is external. + // A protocol-free URI (e.g., //cdn.com/example.js) is external. else { - $options['data'] = $options['file']; $options['type'] = 'external'; + $options['data'] = $source; } } + // A stream wrapper URI (e.g., public://generated_js/example.js). + elseif (file_valid_uri($source)) { + $options['data'] = $source; + } + // By default, file paths are relative to the registering extension. else { - $options['data'] = $path . '/' . $options['file']; + $options['data'] = $path . '/' . $source; } - unset($options['file']); - $options['version'] = $library['version']; - } - elseif (isset($options['external'])) { - $options['type'] = 'external'; - $options['data'] = $options['external']; - unset($options['external']); - $options['version'] = $library['version']; - } - elseif (isset($options['settings'])) { - $options['type'] = 'setting'; - $options['data'] = $options['settings']; - unset($options['settings']); } + $options['version'] = $library['version']; - unset($library[$type][$i]); $library[$type][] = $options; } } - // @todo Replace all uses of #attached and remove this. + // @todo Introduce drupal_add_settings(). + if (isset($library['settings'])) { + $library['js'][] = array( + 'type' => 'setting', + 'data' => $library['settings'], + ); + unset($library['settings']); + } + // @todo Convert all uses of #attached[library][]=array('provider','name') + // into #attached[library][]='provider/name' and remove this. foreach ($library['dependencies'] as $i => $dependency) { if (!is_array($dependency)) { $library['dependencies'][$i] = explode('/', $dependency, 2); diff --git a/core/modules/block/block.library.yml b/core/modules/block/block.library.yml index e31b324..881a5e9 100644 --- a/core/modules/block/block.library.yml +++ b/core/modules/block/block.library.yml @@ -1,7 +1,7 @@ drupal.block: version: VERSION js: - - { file: block.js } + block.js: {} dependencies: - core/jquery - core/drupal @@ -9,9 +9,9 @@ drupal.block: drupal.block.admin: version: VERSION js: - - { file: js/block.admin.js } + js/block.admin.js: {} css: - - { file: css/block.admin.css } + css/block.admin.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/book/book.library.yml b/core/modules/book/book.library.yml index 20365b7..fe4209e 100644 --- a/core/modules/book/book.library.yml +++ b/core/modules/book/book.library.yml @@ -1,7 +1,7 @@ drupal.book: version: VERSION js: - - { file: book.js } + book.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/ckeditor/ckeditor.library.yml b/core/modules/ckeditor/ckeditor.library.yml index 757d5a9..fa4d5f2 100644 --- a/core/modules/ckeditor/ckeditor.library.yml +++ b/core/modules/ckeditor/ckeditor.library.yml @@ -1,9 +1,9 @@ drupal.ckeditor: version: VERSION js: - - { file: js/ckeditor.js } + js/ckeditor.js: {} css: - - { file: css/ckeditor.css } + css/ckeditor.css: {} dependencies: - core/jquery - core/drupal @@ -13,10 +13,10 @@ drupal.ckeditor: drupal.ckeditor.admin: version: VERSION js: - - { file: js/ckeditor.admin.js } + js/ckeditor.admin.js: {} css: - - { file: css/ckeditor.admin.css } - - { file: /core/assets/vendor/ckeditor/skins/moono/editor.css } + css/ckeditor.admin.css: {} + /core/assets/vendor/ckeditor/skins/moono/editor.css: {} dependencies: - core/jquery - core/drupal @@ -36,7 +36,7 @@ drupal.ckeditor.admin: drupal.ckeditor.drupalimage.admin: version: VERSION js: - - { file: js/ckeditor.drupalimage.admin.js } + js/ckeditor.drupalimage.admin.js: {} dependencies: - core/jquery - core/drupal @@ -47,7 +47,7 @@ drupal.ckeditor.drupalimage.admin: drupal.ckeditor.stylescombo.admin: version: VERSION js: - - { file: js/ckeditor.stylescombo.admin.js } + js/ckeditor.stylescombo.admin.js: {} dependencies: - core/jquery - core/drupal @@ -58,6 +58,6 @@ drupal.ckeditor.stylescombo.admin: drupal.ckeditor.drupalimagecaption-theme: version: VERSION js: - - { file: js/plugins/drupalimagecaption/theme.js } + js/plugins/drupalimagecaption/theme.js: {} dependencies: - core/ckeditor diff --git a/core/modules/color/color.library.yml b/core/modules/color/color.library.yml index 6086477..c6a2db9 100644 --- a/core/modules/color/color.library.yml +++ b/core/modules/color/color.library.yml @@ -1,7 +1,7 @@ drupal.color: version: VERSION js: - - { file: color.js } + color.js: {} dependencies: - core/jquery - core/drupal @@ -12,7 +12,7 @@ drupal.color: drupal.color.preview: version: VERSION js: - - { file: preview.js } + preview.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/comment/comment.library.yml b/core/modules/comment/comment.library.yml index fe797db..b4cd2a4 100644 --- a/core/modules/comment/comment.library.yml +++ b/core/modules/comment/comment.library.yml @@ -1,7 +1,7 @@ drupal.comment: version: VERSION js: - - { file: comment-entity-form.js } + comment-entity-form.js: {} dependencies: - core/jquery - core/drupal @@ -10,7 +10,7 @@ drupal.comment: drupal.comment-by-viewer: version: VERSION js: - - { file: js/comment-by-viewer.js } + js/comment-by-viewer.js: {} dependencies: - core/jquery - core/drupal @@ -19,7 +19,7 @@ drupal.comment-by-viewer: drupal.comment-new-indicator: version: VERSION js: - - { file: js/comment-new-indicator.js } + js/comment-new-indicator.js: {} dependencies: - core/jquery - core/drupal @@ -29,7 +29,7 @@ drupal.comment-new-indicator: drupal.node-new-comments-link: version: VERSION js: - - { file: js/node-new-comments-link.js } + js/node-new-comments-link.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/config_translation/config_translation.library.yml b/core/modules/config_translation/config_translation.library.yml index aefcbda..4d8538e 100644 --- a/core/modules/config_translation/config_translation.library.yml +++ b/core/modules/config_translation/config_translation.library.yml @@ -1,4 +1,4 @@ drupal.config_translation.admin: version: VERSION css: - - { file: css/config_translation.admin.css } + css/config_translation.admin.css: {} diff --git a/core/modules/content_translation/content_translation.library.yml b/core/modules/content_translation/content_translation.library.yml index deae9a5..b7c6d47 100644 --- a/core/modules/content_translation/content_translation.library.yml +++ b/core/modules/content_translation/content_translation.library.yml @@ -1,9 +1,9 @@ drupal.content_translation.admin: version: VERSION js: - - { file: content_translation.admin.js } + content_translation.admin.js: {} css: - - { file: css/content_translation.admin.css } + css/content_translation.admin.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/contextual/contextual.library.yml b/core/modules/contextual/contextual.library.yml index 23db334..2f340b4 100644 --- a/core/modules/contextual/contextual.library.yml +++ b/core/modules/contextual/contextual.library.yml @@ -2,11 +2,11 @@ drupal.contextual-links: version: VERSION js: # Ensure to run before contextual/drupal.context-toolbar. - - { file: js/contextual.js, weight: -2 } + js/contextual.js: { weight: -2 } css: - - { file: css/contextual.module.css } - - { file: css/contextual.theme.css } - - { file: css/contextual.icons.css } + css/contextual.module.css: {} + css/contextual.theme.css: {} + css/contextual.icons.css: {} dependencies: - core/jquery - core/drupal @@ -18,9 +18,9 @@ drupal.contextual-links: drupal.contextual-toolbar: version: VERSION js: - - { file: js/contextual.toolbar.js } + js/contextual.toolbar.js: {} css: - - { file: css/contextual.toolbar.css } + css/contextual.toolbar.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/edit/edit.library.yml b/core/modules/edit/edit.library.yml index 385efd2..d80cd0b 100644 --- a/core/modules/edit/edit.library.yml +++ b/core/modules/edit/edit.library.yml @@ -2,28 +2,28 @@ edit: version: VERSION js: # Core. - - { file: js/edit.js, scope: footer } - - { file: js/util.js, scope: footer } + js/edit.js: { scope: footer } + js/util.js: { scope: footer } # Models. - - { file: js/models/BaseModel.js, scope: footer } - - { file: js/models/AppModel.js, scope: footer } - - { file: js/models/EntityModel.js, scope: footer } - - { file: js/models/FieldModel.js, scope: footer } - - { file: js/models/EditorModel.js, scope: footer } + js/models/BaseModel.js: { scope: footer } + js/models/AppModel.js: { scope: footer } + js/models/EntityModel.js: { scope: footer } + js/models/FieldModel.js: { scope: footer } + js/models/EditorModel.js: { scope: footer } # Views. - - { file: js/views/AppView.js, scope: footer } - - { file: js/views/FieldDecorationView.js, scope: footer } - - { file: js/views/EntityDecorationView.js, scope: footer } - - { file: js/views/EntityToolbarView.js, scope: footer } - - { file: js/views/ContextualLinkView.js, scope: footer } - - { file: js/views/FieldToolbarView.js, scope: footer } - - { file: js/views/EditorView.js, scope: footer } + js/views/AppView.js: { scope: footer } + js/views/FieldDecorationView.js: { scope: footer } + js/views/EntityDecorationView.js: { scope: footer } + js/views/EntityToolbarView.js: { scope: footer } + js/views/ContextualLinkView.js: { scope: footer } + js/views/FieldToolbarView.js: { scope: footer } + js/views/EditorView.js: { scope: footer } # Other. - - { file: js/theme.js, scope: footer } + js/theme.js: { scope: footer } css: - - { file: css/edit.module.css } - - { file: css/edit.theme.css } - - { file: css/edit.icons.css } + css/edit.module.css: {} + css/edit.theme.css: {} + css/edit.icons.css: {} dependencies: - core/jquery - core/underscore @@ -41,13 +41,13 @@ edit: edit.inPlaceEditor.form: version: VERSION js: - - { file: js/editors/formEditor.js, scope: footer } + js/editors/formEditor.js: { scope: footer } dependencies: - edit/edit edit.inPlaceEditor.plainText: version: VERSION js: - - { file: js/editors/plainTextEditor.js, scope: footer } + js/editors/plainTextEditor.js: { scope: footer } dependencies: - edit/edit diff --git a/core/modules/editor/editor.library.yml b/core/modules/editor/editor.library.yml index 3681a1d..142ce39 100644 --- a/core/modules/editor/editor.library.yml +++ b/core/modules/editor/editor.library.yml @@ -1,7 +1,7 @@ drupal.editor.admin: version: VERSION js: - - { file: js/editor.admin.js } + js/editor.admin.js: {} dependencies: - core/jquery - core/drupal @@ -9,9 +9,9 @@ drupal.editor.admin: drupal.editor: version: VERSION js: - - { file: js/editor.js } + js/editor.js: {} css: - - { file: css/editor.css } + css/editor.css: {} dependencies: - core/jquery - core/drupal @@ -21,7 +21,7 @@ drupal.editor: drupal.editor.dialog: version: VERSION js: - - { file: js/editor.dialog.js, weight: 2 } + js/editor.dialog.js: { weight: 2 } dependencies: - core/jquery - core/drupal.dialog @@ -31,7 +31,7 @@ drupal.editor.dialog: edit.inPlaceEditor.formattedText: version: VERSION js: - - { file: js/editor.formattedTextEditor.js, scope: footer, attributes: { defer: true } } + js/editor.formattedTextEditor.js: { scope: footer, attributes: { defer: true } } dependencies: - edit/edit - editor/drupal.editor diff --git a/core/modules/field_ui/field_ui.library.yml b/core/modules/field_ui/field_ui.library.yml index b279bdb..5cb861a 100644 --- a/core/modules/field_ui/field_ui.library.yml +++ b/core/modules/field_ui/field_ui.library.yml @@ -1,9 +1,9 @@ drupal.field_ui: version: VERSION js: - - { file: field_ui.js } + field_ui.js: {} css: - - { file: css/field_ui.admin.css } + css/field_ui.admin.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/file/file.library.yml b/core/modules/file/file.library.yml index 42fdfc7..fe4d9ad 100644 --- a/core/modules/file/file.library.yml +++ b/core/modules/file/file.library.yml @@ -1,9 +1,9 @@ drupal.file: version: VERSION js: - - { file: file.js } + file.js: {} css: - - { file: css/file.admin.css } + css/file.admin.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/filter/filter.library.yml b/core/modules/filter/filter.library.yml index 181aa8f..c2bb8ae 100644 --- a/core/modules/filter/filter.library.yml +++ b/core/modules/filter/filter.library.yml @@ -1,9 +1,9 @@ drupal.filter.admin: version: VERSION js: - - { file: filter.admin.js } + filter.admin.js: {} css: - - { file: css/filter.admin.css } + css/filter.admin.css: {} dependencies: - core/jquery - core/drupal @@ -13,7 +13,7 @@ drupal.filter.admin: drupal.filter.filter_html.admin: version: VERSION js: - - { file: filter.filter_html.admin.js } + filter.filter_html.admin.js: {} dependencies: - core/jquery - core/jquery.once @@ -22,9 +22,9 @@ drupal.filter.filter_html.admin: drupal.filter: version: VERSION js: - - { file: filter.js } + filter.js: {} css: - - { file: css/filter.admin.css } + css/filter.admin.css: {} dependencies: - core/jquery - core/drupal @@ -33,4 +33,4 @@ drupal.filter: caption: version: VERSION css: - - { file: css/filter.caption.css } + css/filter.caption.css: {} diff --git a/core/modules/forum/forum.library.yml b/core/modules/forum/forum.library.yml index 45e5ebf..1a1f547 100644 --- a/core/modules/forum/forum.library.yml +++ b/core/modules/forum/forum.library.yml @@ -1,4 +1,4 @@ forum.index: version: VERSION css: - - { file: css/forum.module.css } + css/forum.module.css: {} diff --git a/core/modules/history/history.library.yml b/core/modules/history/history.library.yml index 8154bf7..4920096 100644 --- a/core/modules/history/history.library.yml +++ b/core/modules/history/history.library.yml @@ -1,7 +1,7 @@ drupal.history: version: VERSION js: - - { file: js/history.js } + js/history.js: {} dependencies: - core/jquery - core/drupalSettings diff --git a/core/modules/language/language.library.yml b/core/modules/language/language.library.yml index 4e46d3c..78491b3 100644 --- a/core/modules/language/language.library.yml +++ b/core/modules/language/language.library.yml @@ -1,7 +1,7 @@ language.admin: version: VERSION js: - - { file: language.admin.js } + language.admin.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/locale/locale.library.yml b/core/modules/locale/locale.library.yml index 503e2bf..230f182 100644 --- a/core/modules/locale/locale.library.yml +++ b/core/modules/locale/locale.library.yml @@ -1,7 +1,7 @@ drupal.locale.admin: version: VERSION js: - - { file: locale.admin.js } + locale.admin.js: {} dependencies: - core/jquery - core/drupal @@ -10,7 +10,7 @@ drupal.locale.admin: drupal.locale.datepicker: version: VERSION js: - - { file: locale.datepicker.js } + locale.datepicker.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/menu/menu.library.yml b/core/modules/menu/menu.library.yml index d5b1852..56cf437 100644 --- a/core/modules/menu/menu.library.yml +++ b/core/modules/menu/menu.library.yml @@ -1,7 +1,7 @@ drupal.menu: version: VERSION js: - - { file: menu.js } + menu.js: {} dependencies: - core/jquery - core/drupal @@ -10,7 +10,7 @@ drupal.menu: drupal.menu.admin: version: VERSION js: - - { file: menu.admin.js } + menu.admin.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/node/node.library.yml b/core/modules/node/node.library.yml index 3170a4b..28131b5 100644 --- a/core/modules/node/node.library.yml +++ b/core/modules/node/node.library.yml @@ -1,7 +1,7 @@ drupal.node: version: VERSION js: - - { file: node.js } + node.js: {} dependencies: - core/jquery - core/drupal @@ -11,7 +11,7 @@ drupal.node: drupal.node.preview: version: VERSION js: - - { file: node.preview.js } + node.preview.js: {} dependencies: - core/jquery - core/drupal @@ -19,7 +19,7 @@ drupal.node.preview: drupal.content_types: version: VERSION js: - - { file: content_types.js } + content_types.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/path/path.library.yml b/core/modules/path/path.library.yml index c42039d..2ce29a5 100644 --- a/core/modules/path/path.library.yml +++ b/core/modules/path/path.library.yml @@ -1,7 +1,7 @@ drupal.path: version: VERSION js: - - { file: path.js } + path.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/picture/picture.library.yml b/core/modules/picture/picture.library.yml index f35d66e..f84ed26 100644 --- a/core/modules/picture/picture.library.yml +++ b/core/modules/picture/picture.library.yml @@ -5,6 +5,6 @@ picturefill: # @see https://drupal.org/node/1775530 version: VERSION js: - - { file: picturefill/picturefill.js, weight: -10, group: 0 } + picturefill/picturefill.js: { weight: -10, group: 0 } dependencies: - core/matchmedia diff --git a/core/modules/shortcut/shortcut.library.yml b/core/modules/shortcut/shortcut.library.yml index ea670cd..d0aac1a 100644 --- a/core/modules/shortcut/shortcut.library.yml +++ b/core/modules/shortcut/shortcut.library.yml @@ -1,7 +1,7 @@ drupal.shortcut.admin: version: VERSION js: - - { file: shortcut.admin.js } + shortcut.admin.js: {} dependencies: - core/jquery - core/drupal @@ -9,6 +9,6 @@ drupal.shortcut.admin: drupal.shortcut: version: VERSION css: - - { file: css/shortcut.module.css } - - { file: css/shortcut.theme.css } - - { file: css/shortcut.icons.css } + css/shortcut.module.css: {} + css/shortcut.theme.css: {} + css/shortcut.icons.css: {} diff --git a/core/modules/simpletest/simpletest.library.yml b/core/modules/simpletest/simpletest.library.yml index b934485..ef6b53c 100644 --- a/core/modules/simpletest/simpletest.library.yml +++ b/core/modules/simpletest/simpletest.library.yml @@ -1,9 +1,9 @@ drupal.simpletest: version: VERSION js: - - { file: simpletest.js } + simpletest.js: {} css: - - { file: css/simpletest.module.css } + css/simpletest.module.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/statistics/statistics.library.yml b/core/modules/statistics/statistics.library.yml index b241fdb..2fbe5c0 100644 --- a/core/modules/statistics/statistics.library.yml +++ b/core/modules/statistics/statistics.library.yml @@ -1,7 +1,7 @@ drupal.statistics: version: VERSION js: - - { file: statistics.js, scope: footer } + statistics.js: { scope: footer } dependencies: - core/jquery - core/drupal diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index ca12d22..8588c7d 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -295,14 +295,31 @@ function hook_js_alter(&$javascript) { */ function hook_library_info_alter(&$libraries, $module) { // Update Farbtastic to version 2.0. - if ($module == 'core' && isset($libraries['farbtastic'])) { + if ($module == 'core' && isset($libraries['jquery.farbtastic'])) { // Verify existing version is older than the one we are updating to. - if (version_compare($libraries['farbtastic']['version'], '2.0', '<')) { + if (version_compare($libraries['jquery.farbtastic']['version'], '2.0', '<')) { // Update the existing Farbtastic to version 2.0. - $libraries['farbtastic']['version'] = '2.0'; - $libraries['farbtastic']['js'] = array( - drupal_get_path('module', 'farbtastic_update') . '/farbtastic-2.0.js' => array(), + $libraries['jquery.farbtastic']['version'] = '2.0'; + // To accurately replace library files, the order of files and the options + // of each file have to be retained; e.g., like this: + $old_path = 'assets/vendor/farbtastic'; + // Since the replaced library files are no longer located in a directory + // relative to the original extension, specify an absolute path (relative + // to DRUPAL_ROOT / base_path()) to the new location. + $new_path = '/' . drupal_get_path('module', 'farbtastic_update') . '/js'; + $new_js = array(); + $replacements = array( + $old_path . '/farbtastic.js' => $new_path . '/farbtastic-2.0.js', ); + foreach ($libraries['jquery.farbtastic']['js'] as $source => $options) { + if (isset($replacements[$source])) { + $new_js[$replacements[$source]] = $options; + } + else { + $new_js[$source] = $options; + } + } + $libraries['jquery.farbtastic']['js'] = $new_js; } } } diff --git a/core/modules/system/system.library.yml b/core/modules/system/system.library.yml index 9a398d5..8deb657 100644 --- a/core/modules/system/system.library.yml +++ b/core/modules/system/system.library.yml @@ -1,7 +1,7 @@ drupal.system: version: VERSION js: - - { file: system.js } + system.js: {} dependencies: - core/jquery - core/drupal @@ -11,7 +11,7 @@ drupal.system: drupal.system.modules: version: VERSION js: - - { file: system.modules.js } + system.modules.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/system/tests/modules/common_test/common_test.library.yml b/core/modules/system/tests/modules/common_test/common_test.library.yml index 4a2381d..77282a2 100644 --- a/core/modules/system/tests/modules/common_test/common_test.library.yml +++ b/core/modules/system/tests/modules/common_test/common_test.library.yml @@ -1,8 +1,8 @@ jquery.farbtastic: version: 0.1 js: - - { file: assets/vendor/farbtastic/farbtastic.js } + assets/vendor/farbtastic/farbtastic.js: {} css: - - { file: assets/vendor/farbtastic/farbtastic.css } + assets/vendor/farbtastic/farbtastic.css: {} dependencies: - core/jquery diff --git a/core/modules/taxonomy/taxonomy.library.yml b/core/modules/taxonomy/taxonomy.library.yml index 300f5d5..41193d9 100644 --- a/core/modules/taxonomy/taxonomy.library.yml +++ b/core/modules/taxonomy/taxonomy.library.yml @@ -1,9 +1,9 @@ drupal.taxonomy: version: VERSION js: - - { file: taxonomy.js } + taxonomy.js: {} css: - - { file: css/taxonomy.module.css } + css/taxonomy.module.css: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/text/text.library.yml b/core/modules/text/text.library.yml index 8328f09..8e82411 100644 --- a/core/modules/text/text.library.yml +++ b/core/modules/text/text.library.yml @@ -1,7 +1,7 @@ drupal.text: version: VERSION js: - - { file: text.js } + text.js: {} dependencies: - core/jquery - core/jquery.once diff --git a/core/modules/toolbar/toolbar.library.yml b/core/modules/toolbar/toolbar.library.yml index 7fabdf7..d658457 100644 --- a/core/modules/toolbar/toolbar.library.yml +++ b/core/modules/toolbar/toolbar.library.yml @@ -2,19 +2,19 @@ toolbar: version: VERSION js: # Core. - - { file: js/toolbar.js } + js/toolbar.js: {} # Models. - - { file: js/models/MenuModel.js } - - { file: js/models/ToolbarModel.js } + js/models/MenuModel.js: {} + js/models/ToolbarModel.js: {} # Views. - - { file: js/views/BodyVisualView.js } - - { file: js/views/MenuVisualView.js } - - { file: js/views/ToolbarAuralView.js } - - { file: js/views/ToolbarVisualView.js } + js/views/BodyVisualView.js: {} + js/views/MenuVisualView.js: {} + js/views/ToolbarAuralView.js: {} + js/views/ToolbarVisualView.js: {} css: - - { file: css/toolbar.module.css } - - { file: css/toolbar.theme.css } - - { file: css/toolbar.icons.css } + css/toolbar.module.css: {} + css/toolbar.theme.css: {} + css/toolbar.icons.css: {} dependencies: - core/modernizr - core/jquery @@ -30,9 +30,9 @@ toolbar: toolbar.menu: version: VERSION js: - - { file: js/toolbar.menu.js } + js/toolbar.menu.js: {} css: - - { file: css/toolbar.menu.css } + css/toolbar.menu.css: {} dependencies: - core/jquery - core/drupal @@ -41,7 +41,7 @@ toolbar.menu: toolbar.escapeAdmin: version: VERSION js: - - { file: js/escapeAdmin.js } + js/escapeAdmin.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/tour/tour.library.yml b/core/modules/tour/tour.library.yml index d8dbb41..8077931 100644 --- a/core/modules/tour/tour.library.yml +++ b/core/modules/tour/tour.library.yml @@ -1,7 +1,7 @@ tour: version: VERSION js: - - { file: js/tour.js } + js/tour.js: {} dependencies: - core/jquery - core/drupal @@ -12,16 +12,16 @@ tour: tour-styling: version: VERSION css: - - { file: css/tour.module.css, media: screen } + css/tour.module.css: { media: screen } # @todo Move into /core/assets and core.library.yml. jquery.joyride: remote: https://github.com/zurb/joyride version: v2.0.3 js: - - { file: js/jquery.joyride-2.0.3.js } + js/jquery.joyride-2.0.3.js: {} css: - - { file: css/joyride-2.0.3.css, media: screen } + css/joyride-2.0.3.css: { media: screen } dependencies: - core/jquery - core/jquery.cookie diff --git a/core/modules/update/update.library.yml b/core/modules/update/update.library.yml index 10a9120..a29c180 100644 --- a/core/modules/update/update.library.yml +++ b/core/modules/update/update.library.yml @@ -1,4 +1,4 @@ drupal.update.admin: version: VERSION css: - - { file: css/update.admin.css } + css/update.admin.css: {} diff --git a/core/modules/user/user.library.yml b/core/modules/user/user.library.yml index 03e5313..9bcfdff 100644 --- a/core/modules/user/user.library.yml +++ b/core/modules/user/user.library.yml @@ -1,9 +1,9 @@ drupal.user: version: VERSION js: - - { file: user.js } + user.js: {} css: - - { file: css/user.module.css } + css/user.module.css: {} dependencies: - core/jquery - core/drupal @@ -12,7 +12,7 @@ drupal.user: drupal.user.permissions: version: VERSION js: - - { file: user.permissions.js } + user.permissions.js: {} dependencies: - core/jquery - core/drupal @@ -21,4 +21,4 @@ drupal.user.permissions: drupal.user.icons: version: VERSION css: - - { file: css/user.icons.css } + css/user.icons.css: {} diff --git a/core/modules/views/views.library.yml b/core/modules/views/views.library.yml index 6fd7c7e..7391d1b 100644 --- a/core/modules/views/views.library.yml +++ b/core/modules/views/views.library.yml @@ -1,13 +1,13 @@ views.module: version: VERSION css: - - { file: css/views.module.css } + css/views.module.css: {} views.ajax: version: VERSION js: - - { file: js/base.js, group: 0 } - - { file: js/ajax_view.js, group: 0 } + js/base.js: { group: 0 } + js/ajax_view.js: { group: 0 } dependencies: - core/jquery - core/drupal @@ -20,7 +20,7 @@ views.contextual-links: version: VERSION js: # Ensure to run before contextual/drupal.contextual-links. - - { file: js/views-contextual.js, weight: -10 } + js/views-contextual.js: { weight: -10 } dependencies: - core/jquery - core/drupal @@ -28,4 +28,4 @@ views.contextual-links: views.exposed-form: version: VERSION css: - - { file: css/views.exposed_form.css } + css/views.exposed_form.css: {} diff --git a/core/modules/views_ui/views_ui.library.yml b/core/modules/views_ui/views_ui.library.yml index c50f4f2..410609f 100644 --- a/core/modules/views_ui/views_ui.library.yml +++ b/core/modules/views_ui/views_ui.library.yml @@ -1,9 +1,9 @@ views_ui.admin: version: VERSION js: - - { file: js/ajax.js, group: 0 } - - { file: js/dialog.views.js, group: 0 } - - { file: js/views-admin.js, group: 0 } + js/ajax.js: { group: 0 } + js/dialog.views.js: { group: 0 } + js/views-admin.js: { group: 0 } dependencies: - core/jquery - core/drupal @@ -16,4 +16,4 @@ views_ui.admin: views_ui.listing: version: VERSION js: - - { file: js/views_ui.listing.js, group: 0 } + js/views_ui.listing.js: { group: 0 } diff --git a/core/themes/bartik/bartik.library.yml b/core/themes/bartik/bartik.library.yml index c20e1e1..c4e3622 100644 --- a/core/themes/bartik/bartik.library.yml +++ b/core/themes/bartik/bartik.library.yml @@ -1,4 +1,4 @@ maintenance_page: version: VERSION css: - - { file: css/maintenance-page.css, group: 100 } + css/maintenance-page.css: { group: 100 } diff --git a/core/themes/seven/seven.library.yml b/core/themes/seven/seven.library.yml index 01c3763..ff12caa 100644 --- a/core/themes/seven/seven.library.yml +++ b/core/themes/seven/seven.library.yml @@ -1,6 +1,6 @@ install-page: version: VERSION js: - - { file: js/mobile.install.js, group: 100 } + js/mobile.install.js: { group: 100 } css: - - { file: install-page.css, group: 100 } + install-page.css: { group: 100 }