Last active
December 16, 2015 05:39
-
-
Save iamssen/5385883 to your computer and use it in GitHub Desktop.
Cakefile 에서 stdout 로그를 지속적으로 출력
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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