From 1ce0bb7ad50129fbab6c0a75f18eee6149ca1be3 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Wed, 15 Apr 2020 15:35:58 +0200 Subject: Minify css/html/js --- plugins/webbox/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'plugins/webbox/Makefile') diff --git a/plugins/webbox/Makefile b/plugins/webbox/Makefile index 2ddec0e..1850018 100644 --- a/plugins/webbox/Makefile +++ b/plugins/webbox/Makefile @@ -94,14 +94,18 @@ googletest/src/%.o: googletest/src/%.cc ADD_DEP=Makefile install: - mkdir -p $(DESTDIR)/usr/bin - cp webserver $(DESTDIR)/usr/bin - mkdir -p $(DESTDIR)/usr/lib/webserver/plugins - mkdir -p $(DESTDIR)/usr/local/lib/webserver/plugins + cp $(PROJECTNAME).so $(DESTDIR)/usr/lib/webserver/plugins + + mkdir -p $(DESTDIR)/var/www/webbox + cp -r html/* $(DESTDIR)/var/www/webbox/ + + # Minify, conditionally + command -v uglifyjs && uglifyjs html/webbox.js -m -c > $(DESTDIR)/var/www/webbox/webbox.js || true + command -v htmlmin && \ + htmlmin html/index.html $(DESTDIR)/var/www/webbox/index.html || true + command -v cleancss && cleancss -o $(DESTDIR)/var/www/webbox/webbox.css html/webbox.css || true - mkdir -p $(DESTDIR)/etc - cp webserver.conf $(DESTDIR)/etc/webserver.conf # misc --------------------------------------------------- deb: -- cgit v1.2.3