/
Cakefile
49 lines (41 loc) · 1.24 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#+--------------------------------------------------------------------+
#| Cakefile
#+--------------------------------------------------------------------+
#| Copyright DarkOverlordOfData (c) 2012
#+--------------------------------------------------------------------+
#|
#| This file is a part of not-php
#|
#| Not-php is free software; you can copy, modify, and distribute
#| it under the terms of the GNU General Public License Version 3
#|
#+--------------------------------------------------------------------+
#
# Cakefile
#
{exec} = require "child_process"
# --------------------------------------------------------------------
#
# Run all tests
#
#
task "test", "run tests", ->
REPORTER = "nyan"
exec "NODE_ENV=test
./node_modules/.bin/mocha
--compilers coffee:coffee-script
--reporter #{REPORTER}
--require coffee-script
--require test/test_helper.coffee
", (err, output) ->
console.log output
console.log err.message if err?
# --------------------------------------------------------------------
#
# Build the project
#
#
task "build", "build javascript", ->
exec "coffee --compile --bare --output lib/ src/index.coffee", (err, output) ->
console.log output
console.log err.message if err?