mirror of
https://github.com/jimeh/heartb.it.git
synced 2026-02-19 12:56:47 +00:00
replaced Cakefile with Makefile
This commit is contained in:
21
Cakefile
21
Cakefile
@@ -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
|
|
||||||
Reference in New Issue
Block a user