diff --git a/Cakefile b/Cakefile deleted file mode 100644 index 37592b7..0000000 --- a/Cakefile +++ /dev/null @@ -1,21 +0,0 @@ -fs = require 'fs' -{print} = require 'sys' -{spawn, exec} = require 'child_process' - -build = (watch, callback) -> - if typeof watch is 'function' - callback = watch - watch = false - options = ['-c', '-o', '.', 'src'] - options.unshift '-w' if watch - - coffee = spawn 'coffee', options - coffee.stdout.on 'data', (data) -> print data.toString() - coffee.stderr.on 'data', (data) -> print data.toString() - coffee.on 'exit', (status) -> callback?() if status is 0 - -task 'build', 'Compile CoffeeScript source files', -> - build() - -task 'watch', 'Recompile CoffeeScript source files when modified', -> - build true diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..09345d8 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.SILENT: +.PHONY: build watch + +COFFEE_SRC = src +COFFEE_OUT = . + +build: + coffee -c -o $(COFFEE_OUT) $(COFFEE_SRC) + +watch: + coffee -cw -o $(COFFEE_OUT) $(COFFEE_SRC) + +docs: + docco $(shell find $(COFFEE_SRC) -name '*.coffee')