-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.coffee
57 lines (51 loc) · 1.42 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module.exports = (grunt)->
grunt.loadNpmTasks 'grunt-release'
butt = []
unless process.env.DEBUG
if process.env.BAMBOO
butt = ['PhantomJS']
else if process.env.TRAVIS
butt = ['Firefox']
else
butt = ['Chrome']
grunt.config.init
jshint:
options:
jshintrc: '.jshintrc'
files: [
'src/**/*.js'
]
coffeelint:
options:
grunt.file.readJSON '.coffeelintrc'
files: [
'src/**/*.coffee'
'Gruntfile.coffee'
]
karma:
client:
options:
browsers: butt
frameworks: [ 'mocha', 'sinon-chai' ]
reporters: [ 'spec', 'junit', 'coverage' ]
singleRun: true
logLevel: 'INFO'
preprocessors:
'src/tools/*.js': ['coverage']
'src/test/*.coffee': ['coffee']
files: [
'node_modules/angular/angular.js'
'node_modules/angular-mocks/angular-mocks.js'
'src/tools/*.js'
'src/test/*.coffee'
]
junitReporter:
outputFile: 'build/reports/karma.xml'
coverageReporter:
type: 'lcov'
dir: 'build/reports/coverage/'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-karma'
grunt.registerTask 'lint', [ 'jshint', 'coffeelint' ]
grunt.registerTask 'default', [ 'lint', 'karma' ]