From 6625528c35a60e9bf55d4d10f9786e4431130f5d Mon Sep 17 00:00:00 2001
From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com>
Date: Wed, 5 Oct 2022 08:52:55 -0500
Subject: [PATCH] Improve JS performance
---
layouts/_default/baseof.html | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4c1067d..37f8d00 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -110,17 +110,28 @@
- {{ $fajs := resources.Get "scripts/fontawesome/all.min.js" }}
- {{ $jqueryjs := resources.Get "scripts/jquery/jquery.min.js" }}
- {{ $popperjs := resources.Get "scripts/popper/popper.min.js" }}
- {{ $twbsjs := resources.Get "scripts/bootstrap/bootstrap.min.js" }}
+
+ {{ $fontawesome := resources.Get "scripts/fontawesome/fontawesome.min.js" }}
+ {{ $fontawesomebrands := resources.Get "scripts/fontawesome/brands.min.js" }}
+ {{ $fontawesomeduo := resources.Get "scripts/fontawesome/duotone.min.js" }}
+ {{ $fontawesomecustom := resources.Get "scripts/fa-icons.js" | minify }}
+ {{ $fontawesomebundle := slice $fontawesome $fontawesomebrands $fontawesomeduo $fontawesomecustom | resources.Concat "js/fa-bundle.js" | fingerprint }}
+
+
+
+ {{ $jquery := resources.Get "scripts/jquery/jquery.min.js" }}
{{ $jqmaskjs := resources.Get "scripts/jquery-mask-plugin/jquery.mask.min.js" }}
{{ $fittextjs := resources.Get "scripts/fittext/jquery.fittext.js" | minify }}
{{ $scrolljs := resources.Get "scripts/scroll-effect.js" | minify }}
{{ $maskjs := resources.Get "scripts/phone-masking.js" | minify }}
+ {{ $jquerybundle := slice $jquery $jqmaskjs $fittextjs $scrolljs $maskjs | resources.Concat "js/jquery-bundle.js" | fingerprint }}
+
+
+
+ {{ $popperjs := resources.Get "scripts/popper/popper.min.js" }}
+ {{ $twbsjs := resources.Get "scripts/bootstrap/bootstrap.min.js" }}
{{ $ttjs := resources.Get "scripts/tooltip-enable.js" | minify }}
- {{ $iconsjs := resources.Get "scripts/fa-icons.js" | minify }}
- {{ $alljs := slice $jqueryjs $popperjs $twbsjs $fajs $fittextjs $scrolljs $jqmaskjs $maskjs $ttjs $iconsjs | resources.Concat "js/bundle.js" | fingerprint }}
-
+ {{ $bootstrapbundle := slice $popperjs $twbsjs $ttjs | resources.Concat "js/bootstrap-bundle.js" | fingerprint }}
+