Skip to content

Instantly share code, notes, and snippets.

@0xjjpa
Created August 3, 2012 13:30
Show Gist options
  • Save 0xjjpa/3247719 to your computer and use it in GitHub Desktop.
Save 0xjjpa/3247719 to your computer and use it in GitHub Desktop.
Watcher for Jade, LESS and CoffeeScript
JADE = $(shell find . -name *.jade)
HTML = $(JADE:.jade=.html)
LESS = $(shell find -name *.less)
CSS = $(LESS:.less=.css)
COFF = $(shell find -name *.coffee)
JS = $(COFF:.coffee=.js)
all: html css js
html: $(HTML)
%.html: %.jade
jade < $< --path $< > $@
css: $(CSS)
%.css: %.less
lessc $< > $@
js: $(JS)
%.js: %.coffee
coffee --compile $<
clean:
rm -f $(HTML)
rm -f $(CSS)
rm -f $(JS)
.PHONY: clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment