-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.coffee
59 lines (49 loc) · 1.25 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module.exports = ->
# Project configuration
@initConfig
pkg: @file.readJSON 'package.json'
# CoffeeScript compilation
coffee:
library:
options:
bare: true
expand: true
cwd: 'src'
src: ['**.coffee']
dest: 'lib'
ext: '.js'
# BDD tests on Node.js
mochaTest:
nodejs:
src: ['spec/*.coffee']
options:
reporter: 'spec'
require: [
'coffeescript/register'
]
grep: process.env.TESTS
# Protocol tests
shell:
msgflo:
command: 'node bin/msgflo'
options:
async: true
fbp_test:
command: 'fbp-test --colors'
# Grunt plugins used for building
# Grunt plugins used for testing
@loadNpmTasks 'grunt-mocha-test'
@loadNpmTasks 'grunt-shell-spawn'
@loadNpmTasks 'grunt-contrib-coffee'
# Our local tasks
@registerTask 'fbp-test', [
'shell:msgflo'
'shell:fbp_test'
'shell:msgflo:kill'
]
@registerTask 'build', 'Build the chosen target platform', ['coffee']
@registerTask 'test', 'Build and run automated tests', (target = 'all') =>
@task.run 'build'
@task.run 'mochaTest'
# @task.run 'fbp-test'
@registerTask 'default', ['test']