Skip to content

Instantly share code, notes, and snippets.

@iamssen
Last active December 16, 2015 05:39
Show Gist options
  • Save iamssen/5385883 to your computer and use it in GitHub Desktop.
Save iamssen/5385883 to your computer and use it in GitHub Desktop.
Cakefile 에서 stdout 로그를 지속적으로 출력
task 'run', 'Run Server', ->
build ->
node = exec('node lib/server.js')
node.stdout.on 'data', (data) ->
console.log(data.toString('utf8'))
node.stderr.on 'data', (data) ->
console.log(data.toString('utf8'))
build = (callback) ->
coffee = exec('coffee -m -o lib/ -c src/')
coffee.stdout.on 'data', (data) ->
console.log(data.toString('utf8'))
coffee.stderr.on 'data', (data) ->
console.log(data.toString('utf8'))
coffee.on 'close', (code) ->
if code is 0
callback?()
else
console.log('process exited with code ' + code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment