1 | module.exports = ->
|
2 |
|
3 | @initConfig
|
4 | pkg: @file.readJSON 'package.json'
|
5 |
|
6 |
|
7 | coffee:
|
8 | library:
|
9 | expand: true
|
10 | cwd: 'src'
|
11 | src: ['**.coffee']
|
12 | dest: 'lib'
|
13 | ext: '.js'
|
14 |
|
15 |
|
16 | mochaTest:
|
17 | nodejs:
|
18 | src: ['spec/*.coffee']
|
19 | options:
|
20 | reporter: 'spec'
|
21 |
|
22 |
|
23 | coffeelint:
|
24 | components:
|
25 | files:
|
26 | src: ['spec/*.coffee', 'src/*.coffee', 'src/runtimes/*.coffee', 'src/utils/*.coffee']
|
27 | options:
|
28 | max_line_length:
|
29 | value: 100
|
30 | level: 'warn'
|
31 |
|
32 |
|
33 | shell:
|
34 | msgflo:
|
35 | command: 'node bin/msgflo'
|
36 | options:
|
37 | async: true
|
38 | fbp_test:
|
39 | command: 'fbp-test --colors'
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | @loadNpmTasks 'grunt-mocha-test'
|
46 | @loadNpmTasks 'grunt-coffeelint'
|
47 | @loadNpmTasks 'grunt-shell-spawn'
|
48 | @loadNpmTasks 'grunt-contrib-coffee'
|
49 |
|
50 |
|
51 | @registerTask 'fbp-test', [
|
52 | 'shell:msgflo'
|
53 | 'shell:fbp_test'
|
54 | 'shell:msgflo:kill'
|
55 | ]
|
56 |
|
57 | @registerTask 'build', 'Build the chosen target platform', ['coffee']
|
58 |
|
59 | @registerTask 'test', 'Build and run automated tests', (target = 'all') =>
|
60 | @task.run 'coffeelint'
|
61 | @task.run 'build'
|
62 | @task.run 'mochaTest'
|
63 |
|
64 |
|
65 | @registerTask 'default', ['test']
|