forked from SimeonC/ngRepeatReorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
44 lines (40 loc) · 1.09 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
module.exports = (grunt) ->
# load all grunt tasks
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-istanbul-coverage'
grunt.loadNpmTasks 'grunt-karma'
# Default task.
grunt.registerTask 'default', ['coffee','test']
grunt.registerTask 'test', ['clean', 'karma', 'coverage']
testConfig = (configFile, customOptions) ->
options =
configFile: configFile
keepalive: true
travisOptions = process.env.TRAVIS && { browsers: ['Chrome'], reporters: 'dots' }
grunt.util._.extend options, customOptions, travisOptions
# Project configuration.
grunt.initConfig
clean: ["coverage/*.json"]
coverage:
options:
thresholds:
'statements': 97.5
'branches': 96
'lines': 97.5
'functions': 95
dir: 'coverage'
root: ''
karma:
unit:
options: testConfig 'karma.conf.js'
coffee:
compile:
files:
'dist/ngRepeatReorder.js': 'src/ngRepeatReorder.coffee'
watch:
all:
files: ['src/*']
tasks: ['coffee']