Skip to content

Instantly share code, notes, and snippets.

@tj
Created January 12, 2012 04:56
Show Gist options
  • Save tj/1598850 to your computer and use it in GitHub Desktop.
Save tj/1598850 to your computer and use it in GitHub Desktop.
Stylus web service makefile example
STYLES = $(wildcard stylesheets/*.styl)
CSS = $(STYLES:.styl=.css)
COMPRESSED = $(CSS:.css=.min.css)
all: $(CSS)
style.min.css: $(COMPRESSED)
@cat $^ > $@
%.css: %.styl
@echo ... $<
@curl -s -F style=@$< http://styl.herokuapp.com > $@
%.min.css: %.styl
@echo ... $<
@curl -s -F style=@$< http://styl.herokuapp.com?compress > $@
clean:
rm -f $(CSS)
rm -f $(COMPRESSED)
.PHONY: clean
@tj
Copy link
Author

tj commented Jan 12, 2012

$ time make
... stylesheets/forms.styl
... stylesheets/main.styl

real    0m1.489s
user    0m0.073s
sys 0m0.016s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment