UNPKG

1.46 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 expand: true
10 cwd: 'src'
11 src: ['**.coffee']
12 dest: 'lib'
13 ext: '.js'
14
15 # BDD tests on Node.js
16 mochaTest:
17 nodejs:
18 src: ['spec/*.coffee']
19 options:
20 reporter: 'spec'
21
22 # Coding standards
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 # Protocol tests
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 # Grunt plugins used for building
43
44 # Grunt plugins used for testing
45 @loadNpmTasks 'grunt-mocha-test'
46 @loadNpmTasks 'grunt-coffeelint'
47 @loadNpmTasks 'grunt-shell-spawn'
48 @loadNpmTasks 'grunt-contrib-coffee'
49
50 # Our local tasks
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# @task.run 'fbp-test'
64
65 @registerTask 'default', ['test']