-
Notifications
You must be signed in to change notification settings - Fork 7
/
Cakefile
21 lines (16 loc) · 877 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{spawn, exec} = require 'child_process'
sys = require 'util' #util might be outdated on your system
resources = ['blog']
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
task 'project:watch', 'Watch source files and build JS', (options) ->
runCommand 'coffee', '-o', 'lib/', '-wc', 'src/'
runCommand 'coffee', '-o', 'lib/resources', '-wc', 'src/resources'
task 'test', 'Run all tests', ->
runCommand './node_modules/mocha/bin/mocha', '-c'
# runCommand './node_modules/mocha/bin/mocha', '-c', "test/resources/#{resource}.coffee" for resource in resources
task 'docs', 'Generate all Docs', ->
runCommand './node_modules/paige/bin/paige', './paige.config'