UNPKG

1.28 kBtext/coffeescriptView Raw
1module.exports = ->
2 # Project configuration
3 @initConfig
4 pkg: @file.readJSON 'package.json'
5
6 # CoffeeScript compilation
7 coffee:
8 library:
9 options:
10 bare: true
11 expand: true
12 cwd: 'src'
13 src: ['**.coffee']
14 dest: 'lib'
15 ext: '.js'
16
17 # BDD tests on Node.js
18 mochaTest:
19 nodejs:
20 src: ['spec/*.coffee']
21 options:
22 reporter: 'spec'
23 require: [
24 'coffeescript/register'
25 ]
26 grep: process.env.TESTS
27
28 # Protocol tests
29 shell:
30 msgflo:
31 command: 'node bin/msgflo'
32 options:
33 async: true
34 fbp_test:
35 command: 'fbp-test --colors'
36
37
38 # Grunt plugins used for building
39
40 # Grunt plugins used for testing
41 @loadNpmTasks 'grunt-mocha-test'
42 @loadNpmTasks 'grunt-shell-spawn'
43 @loadNpmTasks 'grunt-contrib-coffee'
44
45 # Our local tasks
46 @registerTask 'fbp-test', [
47 'shell:msgflo'
48 'shell:fbp_test'
49 'shell:msgflo:kill'
50 ]
51
52 @registerTask 'build', 'Build the chosen target platform', ['coffee']
53
54 @registerTask 'test', 'Build and run automated tests', (target = 'all') =>
55 @task.run 'build'
56 @task.run 'mochaTest'
57# @task.run 'fbp-test'
58
59 @registerTask 'default', ['test']