From: Mischa POSLAWSKY Date: Mon, 25 Oct 2021 21:04:23 +0000 (+0200) Subject: word: minify put.js library using uglifyjs X-Git-Tag: v1.13~121 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/f41031bd19fd54229e1efb846254b5afdbd4331f word: minify put.js library using uglifyjs Reduce download size from 3.4kB compressed to just 1.2kB. Dependency node-uglify chosen because of Debian availability. --- diff --git a/.gitignore b/.gitignore index 811bb08..f035906 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ # derived contents /sitemap.xml /light.css +/word/*.min.js # site owner tag for google webmaster tools /google????????????????.html diff --git a/Makefile b/Makefile index 0742e97..2e2b80a 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,12 @@ sitemap.xml: tools/mksitemap light.css: tools/stripcss base.css $(call cmdsave,$^) -word: word/put.js data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json data/wordpairs.json +word: word/put.min.js data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json data/wordpairs.json word/put.js: $(download) tools/wget-ifmodified https://github.com/kriszyp/put-selector/raw/master/put.js $@ +word/%.min.js: word/%.js + uglifyjs -m '' $< -o $@ data/DerivedAge.txt: $(download) tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@ diff --git a/word/memory.plp b/word/memory.plp index d12cc75..8847713 100644 --- a/word/memory.plp +++ b/word/memory.plp @@ -2,7 +2,7 @@ Html({ raw => <<'EOT', - +