From 211d08f9804c70943d7395175f25096483f006d0 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Sat, 19 Aug 2023 10:39:52 -0700 Subject: Version 2.0.0 Refactor, Add PWA Support --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 9514ab9..0f234e1 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,11 @@ "license": "MIT", "homepage": "https://github.com/Jieiku/abridge", "scripts": { - "all": "npm run theme && npm run theme-light && npm run katex-bundle && npm run search-elasticlunr && npm run search-stork && npm run search-tinysearch && npm run abridge-bundle-elasticlunr", - "nonbundles": "npm run theme && npm run theme-light && npm run katex-bundle && npm run search-elasticlunr && npm run search-stork && npm run search-tinysearch", + "all": "npm run theme && npm run theme-light && npm run pwa && npm run katex-bundle && npm run search-elasticlunr && npm run search-stork && npm run search-tinysearch && npm run abridge-bundle-elasticlunr", + "nonbundles": "npm run theme && npm run theme-light && npm run pwa && npm run katex-bundle && npm run search-elasticlunr && npm run search-stork && npm run search-tinysearch", "theme": "uglifyjs static/js/theme.js -c -m -o static/js/theme.min.js", "theme-light": "uglifyjs static/js/theme_light.js -c -m -o static/js/theme_light.min.js", + "pwa": "CACHEFILES=$(find public -type f | sed 's/^public//' | sed 's/^\\/sw\\..*//' | sed 's/.*sw_load.*//' | sed 's/index.html//' | sed 's/.*stork.*//' | sed 's/.*tinysearch.*//' | sort | uniq | sed '/^$/d' | sed \"s/\\(.*\\)/'\\1'/\" | tr '\\n' ',' | uniq | sed 's/.$//' | sed \"s/\\(.*\\)/BASE_CACHE_FILES = \\[\\1\\];/\") && echo $CACHEFILES && sed -i \"s|BASE_CACHE_FILES =.*|$CACHEFILES|\" 'static/sw.js' && uglifyjs static/js/sw_load.js -c -m -o static/js/sw_load.min.js && uglifyjs static/sw.js -c -m -o static/sw.min.js", "katex-bundle": "uglifyjs static/js/katex.min.js static/js/mathtex-script-type.min.js static/js/katex-auto-render.min.js static/js/katexoptions.js -c -m -o static/js/katexbundle.min.js", "search-elasticlunr": "uglifyjs static/js/elasticlunr.min.js static/js/search.js -c -m -o static/js/search_elasticlunr.min.js", "search-stork": "uglifyjs static/js/stork.js static/js/stork_config.js -c -m -o static/js/search_stork.min.js", -- cgit v1.3.1