From d94d61f710bc3dbe152c2656b30dcb461cdf4de5 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 13 May 2021 07:11:03 +0200 Subject: [PATCH] Mapping: materialize -> cdn.jsdelivr.net/gh/ (#458) --- core/mappings.js | 4 ++++ core/shorthands.js | 13 +++++++++++++ pages/updates/updates.html | 1 + 3 files changed, 18 insertions(+) diff --git a/core/mappings.js b/core/mappings.js index d0e5f2c1..11b7be9e 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -600,6 +600,10 @@ mappings.cdn = { 'gh/fancyapps/fancybox@{version}/dist/jquery.fancybox.css': resources.fancyBoxCSS, 'gh/fancyapps/fancybox@{version}/dist/jquery.fancybox.min.css': resources.fancyBoxCSS, 'gh/highlightjs/cdn-release@{version}/build/': resources.highlightJS, + 'gh/johnroy-ui/up@master/materialize.min.css': resources.materializeCSS, + 'gh/johnroy-ui/up@master/materialize.css': resources.materializeCSS, + 'gh/johnroy-ui/up@master/materialize.min.js': resources.materializeJS, + 'gh/johnroy-ui/up@master/materialize.js': resources.materializeJS, 'jquery/{version}/jquery.': resources.jQuery, 'jquery.ui/{version}/jquery-ui.js': resources.jQueryUI, 'jquery.ui/{version}/jquery-ui.min.js': resources.jQueryUI, diff --git a/core/shorthands.js b/core/shorthands.js index eeff7c0a..f62f0e14 100644 --- a/core/shorthands.js +++ b/core/shorthands.js @@ -188,6 +188,19 @@ shorthands.specialFiles = function (channelHost, channelPath, searchString) { 'path': `resources/videojs-seek-buttons/${lastVersion}/videojs-seek-buttons.min.jsm`, 'bundle': 'videojs-seek-buttons' }; + } else if ((channelHost + channelPath).startsWith('cdn.jsdelivr.net/gh/johnroy-ui/up@master/materialize.')) { + if (channelPath.endsWith('js')) { + channelPath = 'js/materialize.min.js'; + } else { + channelPath = 'css/materialize.min.css'; + } + return { + 'source': channelHost, + 'versionDelivered': '1.0.0', + 'versionRequested': '1.0.0', + 'path': `resources/materialize/1.0.0/${channelPath}`, + 'bundle': 'Materialize' + }; } else { return false; } diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 912102d6..b4b04838 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -55,6 +55,7 @@
  • Updated: instantsearch v4.21.0 -> v4.22.0 (#450)
  • Added: webrtc v8.0.0 (#451)
  • Added: bodymovin v4.13.0 and v5.7.8 (#452)
  • +
  • Mapping: materialize -> cdn.jsdelivr.net/gh/ (#458)