-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.coffee
45 lines (37 loc) · 1.08 KB
/
Gruntfile.coffee
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
module.exports = (grunt)->
require('grunt-recurse')(grunt, __dirname)
grunt.expandFileArg = (
prefix = '.',
base = '**',
postfix = '*test.coffee'
)->
part = (v)->"#{prefix}/#{v}#{postfix}"
files = grunt.option('files')
return part(base) unless files
files.split(',').map (v)-> part(v)
testFiles = grunt.expandFileArg('lib/')
grunt.Config =
release: {}
mochaTest:
server:
options:
reporter: 'spec'
src: testFiles
stassets:
build: {}
watch:
server:
files: testFiles
tasks: [
'testServer'
]
options:
spawn: false
grunt.registerTask 'testServer', 'Test the server.', ['mochaTest:server']
grunt.registerTask 'server', 'Prepare the server.', [
'testServer'
# 'copy:server'
]
grunt.registerTask 'default', ['server']
grunt.loadTasks './tasks'
grunt.finalize()