Skip to content

Instantly share code, notes, and snippets.

@andreypopp
Created February 25, 2013 10:55
Show Gist options
  • Save andreypopp/5029108 to your computer and use it in GitHub Desktop.
Save andreypopp/5029108 to your computer and use it in GitHub Desktop.
COFFEE = $(shell find coffee -name '*.coffee' -type f)
JS = $(COFFEE:coffee/%.coffee=js/%.js)
SASS = $(shell find sass -name '*.sass' -type f)
all: js css
watch:
watch -n1 $(MAKE)
js: js/app.bundled.js
css: css/app.css
js/app.bundled.js: $(JS)
@echo building $@
@browserify js/app.js > $@
css/app.css: $(SASS)
@echo building $@
@mkdir -p $(@D)
@sass --compass sass/app.sass > $@
js/%.js: coffee/%.coffee
@echo building $@
@mkdir -p $(@D)
@coffee -bcp $< > $@
clean:
rm -rf $(JS) css/app.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment