-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
69 lines (58 loc) · 1.99 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
58
59
60
61
62
63
64
65
66
67
68
module.exports = (grunt)->
grunt.initConfig
bump:
options:
commit: true
commitMessage: "Release v%VERSION%"
commitFiles: ["package.json"] # '-a' for all files
createTag: true
tagName: "v%VERSION%"
tagMessage: "Version %VERSION%"
push: false
pushTo: "origin"
gitDescribeOptions: "--tags --always --abbrev=1 --dirty=-d"
# jasmine:
# coverage:
# src: ["public/javascripts/**/*.js", "!public/javascripts/specs/**/*.js"]
# # options:
# # specs: ["assets/javascripts/specs/**/*.js"]
# # # template: require("grunt-template-jasmine-istanbul")
# # # templateOptions:
# # # coverage: "bin/coverage/coverage.json"
# # # report: "bin/coverage"
# # # thresholds:
# # # lines: 75
# # # statements: 75
# # # branches: 75
# # # functions: 90
grunt.loadNpmTasks('grunt-bump')
# grunt.loadNpmTasks('grunt-contrib-jasmine')
# grunt.loadNpmTasks('grunt-template-jasmine-istanbul')
module.exports = (grunt) ->
grunt.initConfig mocha_istanbul:
coverage:
src: "public/javascripts/" # the folder, not the files,
options:
mask: "**/*.js"
coveralls:
src: "test" # the folder, not the files
options:
coverage: true
check:
lines: 75
statements: 75
root: "./lib" # define where the cover task should consider the root of libraries that are covered by tests
reportFormats: [
"cobertura"
"lcovonly"
]
grunt.event.on "coverage", (lcovFileContents, done) ->
console.log lcovFileContents
# Check below
done()
return
grunt.loadNpmTasks "grunt-mocha-istanbul"
grunt.registerTask "coveralls", ["mocha_istanbul:coveralls"]
grunt.registerTask "coverage", ["mocha_istanbul:coverage"]
grunt.registerTask 'travis', ["mocha_istanbul"]
grunt.registerTask 'default', [ 'bump' ]