-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cakefile
19 lines (16 loc) · 875 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{spawn, exec} = require 'child_process'
task 'watch', 'Watch source files and build JS & CSS', (options) ->
runCommand = (name, args...) ->
proc = spawn name, args
proc.stderr.on 'data', (buffer) -> console.log buffer.toString()
proc.stdout.on 'data', (buffer) -> console.log buffer.toString()
proc.on 'exit', (status) -> process.exit(1) if status isnt 0
#runCommand 'sass', ['--watch', 'public/css/sass:public/css']
runCommand 'coffee', '-wc', '.'
task 'tests', 'Run all tests in /tests', (options) ->
runCommand = (name, args...) ->
proc = spawn name, args
proc.stderr.on 'data', (buffer) -> console.log buffer.toString()
proc.stdout.on 'data', (buffer) -> console.log buffer.toString()
proc.on 'exit', (status) -> process.exit(1) if status isnt 0
runCommand 'node', 'runtests.js'