Skip to content

Instantly share code, notes, and snippets.

@cpsubrian
Created December 1, 2011 06:56
Show Gist options
  • Save cpsubrian/1414468 to your computer and use it in GitHub Desktop.
Save cpsubrian/1414468 to your computer and use it in GitHub Desktop.
Cakefile help. Need a better way than console.log.
{exec, spawn} = require 'child_process'
task 'test', 'Run Mocha tests', ->
proc = spawn 'mocha', ['-R', 'spec', '--colors']
proc.stdout.on 'data', (buffer) -> console.log buffer.toString()
proc.stderr.on 'data', (buffer) -> console.error buffer.toString()
proc.on 'exit', (status) ->
process.exit(1) if status != 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment