Compress images

This commit is contained in:
Aaron Fischer 2017-08-31 14:56:26 +02:00
parent 3cbce7cddb
commit 7997916968
8 changed files with 2 additions and 1 deletions

View file

@ -5,10 +5,10 @@ all: build stat clean
build: build:
rm -f muri-src.zip muri.zip src/muri.min.js rm -f muri-src.zip muri.zip src/muri.min.js
uglifyjs --compress --mangle --no-dead-code --output src/muri.min.js src/*.js uglifyjs --compress --mangle --no-dead-code --output src/muri.min.js src/*.js
(cd src/assets/images; for i in `ls *.png`; do pngcrush -brute -reduce_palette -ow $$i; done)
(cd src && zip -q -9 ../muri.zip index.html muri.min.js assets/* assets/**/* vendor/*.min.js) (cd src && zip -q -9 ../muri.zip index.html muri.min.js assets/* assets/**/* vendor/*.min.js)
(cd src && zip -q -9 ../muri-src.zip ./* ./**/* ./**/**/* ../README) (cd src && zip -q -9 ../muri-src.zip ./* ./**/* ./**/**/* ../README)
.ONESHELL:
stat: build stat: build
@filesize=`stat --printf="%s" muri.zip` && \ @filesize=`stat --printf="%s" muri.zip` && \
echo $$filesize "byte ->" $$((100*$$filesize/13000)) "%" echo $$filesize "byte ->" $$((100*$$filesize/13000)) "%"
@ -16,4 +16,5 @@ stat: build
clean: clean:
rm -f src/muri.min.js muri.zip rm -f src/muri.min.js muri.zip
.ONESHELL:
.PHONY: build stat clean all .PHONY: build stat clean all

Binary file not shown.

Before

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B