forked from cozy/request-json
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cakefile
25 lines (22 loc) · 740 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
fs = require 'fs'
{exec} = require 'child_process'
task 'tests', 'run tests through mocha', ->
console.log 'Run tests with Mocha...'
command = 'mocha tests.coffee --reporter spec '
command += '--compilers coffee:coffee-script/register --colors'
exec command, (err, stdout, stderr) ->
console.log stdout
if err
console.log "Running mocha caught exception: \n" + err
process.exit 1
else
process.exit 0
task 'build', '', ->
console.log 'Compile main file...'
command = 'coffee -c main.coffee'
exec command, (err, stdout, stderr) ->
if err
console.log 'Running coffee-script compiler caught exception: \n' + err
else
console.log 'Compilation succeeded.'
console.log stdout