replaced Cakefile with Makefile

This commit is contained in:
2012-03-06 22:49:57 +00:00
parent b8e615c076
commit 6a77fa11b0
2 changed files with 14 additions and 21 deletions

View File

@@ -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

14
Makefile Normal file
View File

@@ -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')