Permalink
ea0fd0e Dec 30, 2011
@josh @sstephenson @raroni
21 lines (17 sloc) 529 Bytes
{print} = require 'util'
{spawn} = require 'child_process'
build = (callback) ->
coffee = spawn 'coffee', ['-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/', ->
build()
task 'test', 'Run tests', ->
build ->
process.chdir __dirname
{reporters} = require 'nodeunit'
reporters.default.run ['test']