Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
added scripts folder to tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed Aug 3, 2011
1 parent 572509b commit bfa584b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Cakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{spawn, exec} = require('child_process')

execcb = (err, stdout, stderr) ->
throw err if err

datacb = (data) ->
console.log data.toString().replace /\s+$/, ''

task 'build', 'Build project from src/*.coffee to lib/*.js', ->
exec 'coffee -o lib -c src', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
exec 'coffee -o lib -c src', execcb
exec 'coffee -c scripts', execcb

task 'watch', 'Build and watch for changes', ->
child = spawn 'coffee', ['-w', '-o', 'lib', '-c', 'src']
child.stdout.on 'data', (data) ->
console.log data.toString().replace /\s+$/, ''
child.stderr.on 'data', (data) ->
console.log data.toString()
child.stdout.on 'data', datacb
child.stderr.on 'data', datacb

0 comments on commit bfa584b

Please sign in to comment.