From e603077f1b60491940233db3d9906304e2338dbf Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 9 Nov 2020 18:27:17 +0100 Subject: [PATCH] Added: Font Awesome (Fonts only) (#170) --- core/constants.js | 3 ++- core/shorthands.js | 8 ++++++++ pages/updates/updates.html | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/constants.js b/core/constants.js index 05fc28c6..66a5cc17 100644 --- a/core/constants.js +++ b/core/constants.js @@ -202,7 +202,8 @@ const Regex = { 'BOOTSTRAP_DATEPICKER_3': /\/bootstrap-datepicker3.*\.css/, 'BOOTSTRAP_DATEPICKER': /\/bootstrap-datepicker.*\.css/, 'FONT_AWESOME': /use\.fontawesome\.com\/fa-loader\.css/, - 'FONT_AWESOME_WITH_CODE': /use\.fontawesome\.com\/[a-z0-9]{10}\.(js|css)/ + 'FONT_AWESOME_WITH_CODE': /use\.fontawesome\.com\/[a-z0-9]{10}\.(js|css)/, + 'FONT_AWESOME_ONLY_FONTS': /\/font-awesome\/(?:\d{1,2}\.){1,3}\d{1,2}\/fonts\// }; const Links = { diff --git a/core/shorthands.js b/core/shorthands.js index 7aca77f4..21f50a03 100644 --- a/core/shorthands.js +++ b/core/shorthands.js @@ -165,6 +165,14 @@ shorthands.specialFiles = function (channelHost, channelPath, searchString) { 'path': 'resources/google-charts/loader.jsm', 'bundle': '' }; + } else if (Regex.FONT_AWESOME_ONLY_FONTS.test(channelPath)) { + lastVersion = targets.setLastVersion('/fontawesome/4.'); + return { + 'source': channelHost, + 'versionDelivered': lastVersion, + 'path': 'resources/fontawesome/' + lastVersion + '/' + helpers.extractFilenameFromPath(channelPath), + 'bundle': 'Font Awesome (Fonts)' + }; } else { return false; } diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 45447ba6..5aebf36a 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -39,6 +39,7 @@
  • Added: Bootstrap Bundle JS to maxcdn.bootstrapcdn.com (#157)
  • Added: Pagination.js v2.1.5 (#157)
  • Added: magnific-popup.js (#169)
  • +
  • Added: Font Awesome (Fonts only) (#170)