Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.705 kB
{spawn} = require 'child_process'
{print} = require 'util'
fs = require 'fs'
spawnAndRun = (command, args, callback) ->
subproc = spawn(command, args)
subproc.stderr.on 'data', (data) ->
process.stderr.write data.toString()
subproc.stdout.on 'data', (data) ->
print data.toString()
subproc.on 'exit', (code) ->
callback?() if code is 0
test = (callback) ->
spawnAndRun 'jasmine-node', ['--coffee', 'spec'], callback
build = (callback) ->
fs.mkdir 'lib', 0o0755
print "compiling..."
spawnAndRun 'coffee', ['--compile', '--output', 'lib', 'src'], callback
print "\n"
task 'test', 'Run all tests', ->
test()
task 'build', 'Build the Javascript output', ->
build()
Jump to Line
Something went wrong with that request. Please try again.