Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added watch

  • Loading branch information...
commit 299aeeb9a9d7de41ac60fcdb9cffc3a6bec9d085 1 parent b6e94e7
@cengebretson cengebretson authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 Cakefile
View
9 Cakefile
@@ -1,8 +1,8 @@
{print} = require 'util'
{spawn} = require 'child_process'
-build = (callback) ->
- coffee = spawn 'coffee', ['-c', '-o', 'lib', 'src']
+build = (callback, watch = false) ->
+ coffee = spawn 'coffee', [(if watch then '-cw' else '-c'), '-o', 'lib', 'src']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
@@ -11,4 +11,7 @@ build = (callback) ->
callback?() if code is 0
task 'build', 'Build lib/ from src/', ->
- build()
+ build()
+
+task 'watch', 'Watch lib/ from src/', ->
+ build(null, true)
Please sign in to comment.
Something went wrong with that request. Please try again.