Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (22 sloc) 0.798 kb
bbcdc31 @mauricemach Synched Cakefile with zappa.
authored
1 {spawn, exec} = require 'child_process'
2 log = console.log
75ee63a @mauricemach Initial import.
authored
3
4 task 'build', ->
bbcdc31 @mauricemach Synched Cakefile with zappa.
authored
5 run 'coffee -o lib -c src/*.coffee'
75ee63a @mauricemach Initial import.
authored
6
09ecf4f @mauricemach Updated examples.
authored
7 task 'test', -> require('./test').run()
9b2b6e5 @mauricemach Benchmark refactoring.
authored
8
bbcdc31 @mauricemach Synched Cakefile with zappa.
authored
9 task 'bench', -> require('./benchmark').run()
10
11 task 'docs', ->
12 run 'docco src/coffeekup.coffee'
13
14 run = (args...) ->
15 for a in args
16 switch typeof a
17 when 'string' then command = a
18 when 'object'
19 if a instanceof Array then params = a
20 else options = a
21 when 'function' then callback = a
22
23 command += ' ' + params.join ' ' if params?
24 cmd = spawn '/bin/sh', ['-c', command], options
59c6701 @mauricemach Correctly relaying stdout and stderr in Cakefile.
authored
25 cmd.stdout.on 'data', (data) -> process.stdout.write data
26 cmd.stderr.on 'data', (data) -> process.stderr.write data
bbcdc31 @mauricemach Synched Cakefile with zappa.
authored
27 process.on 'SIGHUP', -> cmd.kill()
28 cmd.on 'exit', (code) -> callback() if callback? and code is 0
Something went wrong with that request. Please try again.