Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Optimize PNGs in themes and as part of build process #2827

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions Makefile
Expand Up @@ -97,7 +97,7 @@ CSSFILES = ${CSSTHEMEFILES} ${CSSSTRUCTUREFILES}

# By default, this is what get runs when make is called without any arguments.
# Min and un-min CSS and JS files are the only things built
all: init js min css cssmin notify
all: init js min css cssmin notify images imagesmin

# Build the normal CSS file.
css: init
Expand All @@ -113,6 +113,14 @@ cssmin: init css
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${CSS} >> ${OUTPUT}/${CSSMIN}
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${CSSSTRUCTURE} >> ${OUTPUT}/${CSSSTRUCTUREMIN}

images: init
@@cp -R css/themes/${CSSTHEME}/images ${OUTPUT}/

imagesmin: images
@@find ${OUTPUT} -name '*png' -exec optipng -o3 {} \;
@@find ${OUTPUT} -name '*png' -exec advpng -z -4 {} \;
@@find ${OUTPUT} -name '*png' -exec advdef -z -4 {} \;

# Build the normal JS file
js: init
# Build the JavaScript file
Expand Down Expand Up @@ -142,11 +150,11 @@ pull:
@@git pull --quiet

# Zip the 4 files and the theme images into one convenient package
zip: init js min css cssmin
zip: init js min css cssmin images imagesmin
@@mkdir -p ${DIR}
@@cp ${OUTPUT}/*.js ${DIR}/
@@cp ${OUTPUT}/*.css ${DIR}/
@@cp -R css/themes/${CSSTHEME}/images ${DIR}/
@@cp -R ${OUTPUT}/images ${DIR}/
@@zip -rq ${OUTPUT}/${DIR}.zip ${DIR}
@@rm -fr ${DIR}

Expand Down
Binary file modified css/themes/default/images/ajax-loader.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/default/images/icons-18-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/default/images/icons-18-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/default/images/icons-36-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/default/images/icons-36-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/ajax-loader.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/icon-search-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/icons-18-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/icons-18-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/icons-36-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/icons-36-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/texture_05.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified css/themes/valencia/images/texture_075.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.