Skip to content

Instantly share code, notes, and snippets.

@hjst
Created July 13, 2012 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hjst/3104846 to your computer and use it in GitHub Desktop.
Save hjst/3104846 to your computer and use it in GitHub Desktop.
Makefile for Skeleton boilerplate, using yuicompressor
BUILDDIR = .build
YUIURL = http://yui.zenfs.com/releases/yuicompressor/yuicompressor-2.4.7.zip
YUIJAR = $(BUILDDIR)/yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar
all: combine squish
build-init: clean
mkdir $(BUILDDIR);
cd $(BUILDDIR); wget $(YUIURL) -O yui.zip; unzip yui.zip;
clean:
rm -rf $(BUILDDIR);
combine:
cat \
stylesheets/base.css \
stylesheets/skeleton.css \
stylesheets/layout.css \
> $(BUILDDIR)/combined.css
# ordering isn't important in my case, so find is more convenient
find javascript/ -maxdepth 1 -name "*.js" -type f -exec cat '{}' > $(BUILDDIR)/combined.js \;
squish:
java -jar $(YUIJAR) $(BUILDDIR)/combined.css -o ./stylesheets/min/combined.css
java -jar $(YUIJAR) $(BUILDDIR)/combined.js -o ./javascript/min/combined.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment