Skip to content

Instantly share code, notes, and snippets.

@fatihacet
Created October 11, 2012 08:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatihacet/3870950 to your computer and use it in GitHub Desktop.
Save fatihacet/3870950 to your computer and use it in GitHub Desktop.
Compressing all css files into one file with YUI Compressor.
#!/bin/sh
#usage : ./scripts/minify.sh
echo "Deleting old content of compressed file..."
echo "" > css/compressed/all.css
echo "Combining all css files into one.."
cat \
css/reset.css \
css/generic.css \
css/layout.css \
css/homepage.css \
css/register.css \
css/login.css \
css/popup.css \
css/address.css \
css/category.css \
css/order.css \
css/search.css \
css/ipr.css \
> css/compressed/tmp.css
echo "Compressing CSS files..."
java -jar tools/yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar \
--type css \
-o css/compressed/all.css \
css/compressed/tmp.css
echo "CSS compilation succeeded."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment