Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (34 sloc) 1.36 KB
{ spawn, exec } = require 'child_process'
task 'build', 'Make ecmascript files', ->
exec 'coffee -cb -o lib src/*.coffee', (error, data) ->
console.error error if error
console.log data if data
exec 'coffee -cb -o lib/plugins src/plugins/*.coffee', (error, data) ->
console.error error if error
console.log data if data
exec 'coffee -cb -o bin src/bin/*.coffee', (error, data) ->
console.error error if error
console.log data if data
exec 'coffee -cb -o test src/test/*.coffee', (error, data) ->
console.error error if error
console.log data if data
invoke 'docs'
task 'watch', 'Development mode - compile as you save', ->
main = exec 'coffee -wcb -o lib src/*.coffee'
main.stdout.pipe process.stdout
main.stderr.pipe process.stderr
plugins = exec 'coffee -wcb -o lib/plugins src/plugins/*.coffee'
plugins.stdout.pipe process.stdout
plugins.stderr.pipe process.stderr
bin = exec 'coffee -wcb -o bin src/bin/*.coffee'
bin.stdout.pipe process.stdout
bin.stderr.pipe process.stderr
test = exec 'coffee -wcb -o test src/test/*.coffee'
test.stdout.pipe process.stdout
test.stderr.pipe process.stderr
task 'test', 'Run tests', ->
expresso = exec 'expresso -s -t 10000 test/*.test.js'
expresso.stdout.pipe process.stdout
expresso.stderr.pipe process.stderr
task 'docs', 'Make docs', ->
exec 'docco src/*.coffee'
Jump to Line
Something went wrong with that request. Please try again.