gulp minify

This commit is contained in:
eshengsky
2019-06-20 12:10:35 +08:00
parent ea9d305b91
commit 6c769aee69
3 changed files with 3 additions and 1 deletions

File diff suppressed because one or more lines are too long

1
public/dist/js/prehandler.js vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";if("serviceWorker"in navigator){var newWorker,home_loading_timeout=2e3,home_loading_begin=new Date;navigator.serviceWorker.register("/sw.js").then(function(e){document.body.classList.add("shown"),e.addEventListener("updatefound",function(){document.body.style.overflow="hidden",document.querySelector("#home-loading").style.display="block",(newWorker=e.installing).addEventListener("statechange",function(){switch(newWorker.state){case"installed":var e=new Date;if(home_loading_timeout<e-home_loading_begin)document.querySelector("#home-loading").style.display="none",document.body.style.overflow="auto";else setTimeout(function(){document.querySelector("#home-loading").style.display="none",document.body.style.overflow="auto"},home_loading_timeout-(e-home_loading_begin))}})})})}else document.body.classList.add("shown");

1
public/dist/js/sw.js vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";importScripts("/nodeModules/workbox-sw/build/workbox-sw.js"),workbox&&(workbox.setConfig({modulePathCb:function(o){return"/nodeModules/".concat(o,"/build/").concat(o,".prod.js")}}),workbox.precaching.precacheAndRoute([]),workbox.routing.registerRoute("https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js",new workbox.strategies.StaleWhileRevalidate),workbox.routing.registerRoute("https://cdn.bootcss.com/highlight.js/9.12.0/styles/github.min.css",new workbox.strategies.StaleWhileRevalidate),workbox.routing.registerRoute("http://v3.jiathis.com/code/jia.js",new workbox.strategies.StaleWhileRevalidate),workbox.routing.registerRoute("https://hm.baidu.com/hm.js",new workbox.strategies.StaleWhileRevalidate),workbox.routing.registerRoute(new RegExp('.+.(?:js|css|png|jpg|jpeg|svg|ico|swf|woff|woff2|eot|ttf")$'),new workbox.strategies.CacheFirst),workbox.routing.registerRoute(function(o){var e=self.location.origin,t=o.url.href;return t===e+"/"||(0===t.indexOf(e+"/blog")||(t===e+"/guestbook"||t===e+"/about"))},new workbox.strategies.NetworkFirst));