Created
July 13, 2012 13:17
-
-
Save hjst/3104846 to your computer and use it in GitHub Desktop.
Makefile for Skeleton boilerplate, using yuicompressor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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