Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 492 Bytes
{print} = require 'util'
{spawn} = require 'child_process'
build = (callback, watch = false) ->
coffee = spawn 'coffee', [(if watch then '-cw' else '-c'), '-o', 'lib', 'src']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
print data.toString()
coffee.on 'exit', (code) ->
callback?() if code is 0
task 'build', 'Build lib/ from src/', ->
task 'watch', 'Watch lib/ from src/', ->
build(null, true)
Something went wrong with that request. Please try again.