Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 644 Bytes
fs = require 'fs'
{print} = require 'util'
which = require 'which'
{spawn, exec} = require 'child_process'
# ANSI Terminal Colors
bold = '\x1B[0;1m'
red = '\x1B[0;31m'
green = '\x1B[0;32m'
reset = '\x1B[0m'
log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '')
build = (callback) ->
options = ['-c','-b', '-o', 'lib', 'lib']
cmd = which.sync 'coffee'
coffee = spawn cmd, options
coffee.stdout.pipe process.stdout
coffee.stderr.pipe process.stderr
coffee.on 'exit', (status) -> callback?() if status is 0
task 'build', ->
build -> log ":)", green