forked from saschagehlich/hotnode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cakefile
22 lines (19 loc) · 707 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
util = require 'util'
fs = require 'fs'
exec = require('child_process').exec
spawn = require('child_process').spawn
LEVELS =
whitespace: 'WHITESPACE_ONLY'
simple: 'SIMPLE_OPTIMIZATIONS'
advanced: 'ADVANCED_OPTIMIZATIONS'
task 'watch', 'watches and compiles coffee', ->
util.print "Spawning coffee watcher for node"
coffee = spawn 'coffee', ['-cwl', '--bare', '-o', 'javascript', 'coffeescript']
util.print ""
[coffee].forEach (child) ->
child.stdout.on 'data', (data) ->
util.print data
exec "growlnotify -m \"#{data}\" -t \"Cakefile\""
child.stderr.on 'data' , (data) ->
util.print data
exec "growlnotify -m \"#{data}\" -t \"Cakefile\""