diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 00000000..ef82c2d3 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,5 @@ +.PHONY: minify + +minify: + make -C img/ minify + make -C js/ minify diff --git a/img/GNUmakefile b/img/GNUmakefile new file mode 100644 index 00000000..09b13069 --- /dev/null +++ b/img/GNUmakefile @@ -0,0 +1,8 @@ +OPTIPNG ?= optipng + +.PHONY: minify +minify: $(patsubst %.png,%.png.opt,$(wildcard *.png)) + +%.png.opt: %.png + ${OPTIPNG} $< + @touch $@ diff --git a/js/GNUmakefile b/js/GNUmakefile new file mode 100644 index 00000000..6cdccc1e --- /dev/null +++ b/js/GNUmakefile @@ -0,0 +1,9 @@ +CLOSUREJAR ?= ../compiler.jar + +.PHONY: minify +minify: $(patsubst %.js,%.js.old,$(wildcard *.js)) + +%.js.old: %.js + @mv -f $< $@ + java -jar ${CLOSUREJAR} --compilation_level SIMPLE_OPTIMIZATIONS $@ > $< + @touch $@