-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
38 lines (35 loc) · 888 Bytes
/
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
module.exports = (grunt) ->
grunt.initConfig
coffee:
dev:
expand: true
cwd: 'src'
src: [
'*.coffee'
]
dest: 'lib/'
ext: '.js'
options:
bare: true
mochaTest:
dev:
options:
reporter: 'spec'
src: ['test/*.coffee']
env:
test:
NODE_ENV: 'test'
'test-verbose':
NODE_ENV: 'test-verbose'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-mocha-test'
grunt.loadNpmTasks 'grunt-env'
grunt.registerTask 'build', ['coffee:dev']
grunt.registerTask 'test', ['coffee:dev', 'env:test', 'mochaTest:dev']
grunt.registerTask 'test-verbose', ['coffee:dev', 'env:test-verbose', 'mochaTest:dev']
grunt.registerTask 'default', ->
grunt.log.writeln """
Usage:
- grunt build
- grunt test
""".yellow