-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
41 lines (29 loc) · 1.01 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
exec = require('child_process').exec
module.exports = (grunt) ->
grunt.initConfig
shell:
instrument:
command: './node_modules/.bin/jscoverage src src-cov'
'rm-instrumented':
command: 'rm -rf src-cov'
jshint:
all: ['src/*.js', 'spec/*.js']
options:
jshintrc: '.jshintrc'
jasmine:
all:
src: ['src/straw-android.js']
options:
specs: 'spec/*.js'
vendor: ['bower_components/sinon-1.7.3.js/index.js']
coverage:
src: ['src-cov/straw-android.js']
options:
specs: 'spec/*.js'
helpers: 'node_modules/jasmine-jscoverage-reporter/reporter.js'
vendor: ['bower_components/sinon-1.7.3.js/index.js']
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.loadNpmTasks 'grunt-shell'
grunt.registerTask 'default', ['jshint', 'jasmine:all']
grunt.registerTask 'cov', ['jshint', 'shell:instrument', 'jasmine:coverage', 'shell:rm-instrumented']