mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 03:32:40 +00:00
🔧 Chore: remove husky and adjust npm script
This commit is contained in:
Generated
-19
@@ -20,7 +20,6 @@
|
||||
"babelify": "^10.0.0",
|
||||
"browserify": "^17.0.0",
|
||||
"core-js": "^3.20.3",
|
||||
"husky": "^7.0.4",
|
||||
"minimist": "^1.2.5",
|
||||
"segmentit": "^2.0.3"
|
||||
}
|
||||
@@ -3538,18 +3537,6 @@
|
||||
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz",
|
||||
"integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"husky": "lib/bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
@@ -7741,12 +7728,6 @@
|
||||
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
|
||||
"dev": true
|
||||
},
|
||||
"husky": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz",
|
||||
"integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
|
||||
+5
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fixit-src",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.13",
|
||||
"description": "FixIt theme source file",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
@@ -14,7 +14,6 @@
|
||||
"babelify": "^10.0.0",
|
||||
"browserify": "^17.0.0",
|
||||
"core-js": "^3.20.3",
|
||||
"husky": "^7.0.4",
|
||||
"minimist": "^1.2.5",
|
||||
"segmentit": "^2.0.3"
|
||||
},
|
||||
@@ -23,22 +22,15 @@
|
||||
"babel": "npx babel src/js/theme.js --out-file assets/js/theme.min.js --source-maps --no-comments && npx babel src/js/service-worker.js --out-file static/service-worker.min.js --source-maps --no-comments",
|
||||
"build": "npm run babel && hugo -v --source=exampleSite --themesDir ../.. --gc",
|
||||
"build-lunr-segmentit": "browserify src/lib/lunr.segmentit.js -o assets/lib/lunr/lunr.segmentit.js -t babelify --presets @babel/preset-env --presets minify",
|
||||
"start": "npm run babel && hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender",
|
||||
"start:production": "npm run babel && hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender -e production",
|
||||
"check": "htmlproofer exampleSite/public --check-html --allow-hash-href --empty-alt-ignore --disable-external",
|
||||
"copy": "rm -rf resources && cp -rf exampleSite/resources resources",
|
||||
"server": "hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender",
|
||||
"server:production": "hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender -e production",
|
||||
"server": "hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender --navigateToChanged",
|
||||
"server:production": "hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender --navigateToChanged -e production",
|
||||
"start": "npm run babel && npm run server",
|
||||
"start:production": "npm run babel && npm run server:production",
|
||||
"algolia": "atomic-algolia"
|
||||
},
|
||||
"resolutions": {
|
||||
"minimist": "^1.2.5"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "npm run build && npm run copy && git add resources assets/js"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Lruihao/FixIt.git"
|
||||
|
||||
Vendored
+2
@@ -1 +1,3 @@
|
||||
"use strict";function _createForOfIteratorHelper(a,b){var c="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!c){if(Array.isArray(a)||(c=_unsupportedIterableToArray(a))||b&&a&&"number"==typeof a.length){c&&(a=c);var d=0,e=function(){};return{s:e,n:function n(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function e(a){throw a},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f,g=!0,h=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return g=a.done,a},e:function e(a){h=!0,f=a},f:function f(){try{g||null==c.return||c.return()}finally{if(h)throw f}}}}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}var CACHE_VERSION=1,BASE_CACHE_FILES=["/css/style.min.css","/js/theme.min.js","/site.webmanifest"],OFFLINE_CACHE_FILES=["/css/style.min.css","/js/theme.min.js","/site.webmanifest","/offline/"],NOT_FOUND_CACHE_FILES=["/css/style.min.css","/js/theme.min.js","/site.webmanifest","/404.html"],OFFLINE_PAGE="/offline/",NOT_FOUND_PAGE="/404.html",CACHE_VERSIONS={assets:"assets-v1",content:"content-v1",offline:"offline-v1",notFound:"404-v1"},MAX_TTL={"/":3600,html:3600,json:86400,js:86400,css:86400},CACHE_BLACKLIST=[function(a){return!a.startsWith("http://localhost")}],SUPPORTED_METHODS=["GET"];function isBlacklisted(a){return!!(0<CACHE_BLACKLIST.length)&&!CACHE_BLACKLIST.filter(function(b){return!("function"!=typeof b)&&!b(a)}).length}function getFileExtension(a){var b=a.split(".").reverse()[0].split("?")[0];return b.endsWith("/")?"/":b}function getTTL(a){if("string"==typeof a){var b=getFileExtension(a);return"number"==typeof MAX_TTL[b]?MAX_TTL[b]:null}return null}function installServiceWorker(){return Promise.all([caches.open(CACHE_VERSIONS.assets).then(function(a){return a.addAll(BASE_CACHE_FILES)}),caches.open(CACHE_VERSIONS.offline).then(function(a){return a.addAll(OFFLINE_CACHE_FILES)}),caches.open(CACHE_VERSIONS.notFound).then(function(a){return a.addAll(NOT_FOUND_CACHE_FILES)})]).then(function(){return self.skipWaiting()})}function cleanupLegacyCache(){var a=Object.keys(CACHE_VERSIONS).map(function(a){return CACHE_VERSIONS[a]});return new Promise(function(b,c){caches.keys().then(function(b){return b.filter(function(b){return!~a.indexOf(b)})}).then(function(a){a.length?Promise.all(a.map(function(a){return caches.delete(a)})).then(function(){b()}).catch(function(a){c(a)}):b()}).catch(function(a){c(a)})})}self.addEventListener("install",function(a){a.waitUntil(Promise.all([installServiceWorker(),self.skipWaiting()]))}),self.addEventListener("activate",function(a){a.waitUntil(Promise.all([cleanupLegacyCache(),self.clients.claim(),self.skipWaiting()]).catch(function(a){console.log(a),self.skipWaiting()}))}),self.addEventListener("fetch",function(a){a.respondWith(caches.open(CACHE_VERSIONS.content).then(function(b){return b.match(a.request).then(function(c){if(c){var d,e=c.headers.entries(),f=null,g=_createForOfIteratorHelper(e);try{for(g.s();!(d=g.n()).done;){var j=d.value;"date"===j[0]&&(f=new Date(j[1]))}}catch(a){g.e(a)}finally{g.f()}if(f){var h=parseInt((new Date().getTime()-f.getTime())/1e3),i=getTTL(a.request.url);return i&&h>i?new Promise(function(d){return fetch(a.request.clone()).then(function(e){e?(b.put(a.request,e.clone()),d(e)):d(c)}).catch(function(){d(c)})}).catch(function(a){return console.log(a),c}):c}return c}return null}).then(function(c){return c?c:fetch(a.request.clone()).then(function(c){return 400>c.status?(~SUPPORTED_METHODS.indexOf(a.request.method)&&!isBlacklisted(a.request.url)&&"http"===a.request.url.slice(0,4)&&b.put(a.request,c.clone()),c):caches.open(CACHE_VERSIONS.notFound).then(function(a){return a.match(NOT_FOUND_PAGE)})}).then(function(a){if(a)return a}).catch(function(){return caches.open(CACHE_VERSIONS.offline).then(function(a){return a.match(OFFLINE_PAGE)})})}).catch(function(a){throw console.error(" Error in fetch handler:",a),a})}))});
|
||||
|
||||
//# sourceMappingURL=service-worker.min.js.map
|
||||
Reference in New Issue
Block a user