From 0ebfc94c8faf2eda73f31cc80778a1db28bbef3c Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sun, 27 Feb 2022 13:56:02 +0800 Subject: [PATCH] :wrench: Chore: remove husky and adjust npm script --- package-lock.json | 19 ------------------- package.json | 18 +++++------------- static/service-worker.min.js | 2 ++ 3 files changed, 7 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index d5b0aa7c..340512f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index bb6892a5..42344fcc 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/static/service-worker.min.js b/static/service-worker.min.js index e9b1e477..b9e9b217 100644 --- a/static/service-worker.min.js +++ b/static/service-worker.min.js @@ -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);ci?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 \ No newline at end of file