From bd21ec5e5bd69ee3bf3a4aeea7a72297990651e3 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 5 Jul 2016 10:44:34 +0200 Subject: Minify html --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ff356b5..f7f4008 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ version = $(shell git rev-parse --short HEAD) versioned_jpg = 's/.*/.jpg?&/' versioned_png = 's/.*/.png?&/' +#versioned_jpg='s/.*/.&.jpg/' +#versioned_png='s/.*/.&.png/' + version_args = --stringparam versioned_jpg $(shell echo $(version) | sed $(versioned_jpg)) --stringparam versioned_png $(shell echo $(version) | sed $(versioned_png)) xsltproc=xsltproc --stringparam stylesheet "$(shell cat style/style.min.css)" --stringparam version $(version) $(version_args) @@ -13,12 +16,15 @@ fix_doctype=sed 's/ SYSTEM "about:legacy-compat"//' to_html=$(fix_doctype) | xsltproc xsl/convert-xhtml-to-html.xsl - | $(fix_doctype) | sed -e 's/
<\/br>/
/g' -e 's/<\/img>//g' -e 's/<\/link>//g' -e 's/<\/meta>//g' -e 's/ $@ %.html: %.xml %.xsl $(common_depend) - $(V_XSLT) $(xsltproc) --stringparam suffix .html $< | $(to_html) > $@ + $(V_XSLT) $(xsltproc) --stringparam suffix .html $< | $(to_html) | $(html_minify) > $@ %.html: %.xml $(common_depend) - $(V_XSLT) $(xsltproc) --stringparam suffix .html $< | $(to_html) > $@ + $(V_XSLT) $(xsltproc) --stringparam suffix .html $< | $(to_html) | $(html_minify) > $@ style/style.min.css: style/style.css style/font.css $(V_CSS) node_modules/.bin/postcss -u postcss-import -u postcss-css-variables style/style.css | node_modules/.bin/cleancss > style/style.min.css -- cgit