File tree 5 files changed +41
-5
lines changed
5 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ results
13
13
lib
14
14
node_modules
15
15
components
16
+ coverage
16
17
bower_components
17
18
npm-debug.log
18
19
.idea
Original file line number Diff line number Diff line change @@ -85,6 +85,23 @@ module.exports = function(grunt) {
85
85
autoWatch : true
86
86
}
87
87
} ,
88
+ coveralls : {
89
+ // Options relevant to all targets
90
+ options : {
91
+ // When true, grunt-coveralls will only print a warning rather than
92
+ // an error, to prevent CI builds from failing unnecessarily (e.g. if
93
+ // coveralls.io is down). Optional, defaults to false.
94
+ force : false
95
+ } ,
96
+
97
+ restangular : {
98
+ // LCOV coverage file (can be string, glob or array)
99
+ src : 'coverage/**/lcov.info' ,
100
+ options : {
101
+ // Any options for just this target
102
+ }
103
+ } ,
104
+ } ,
88
105
changelog : {
89
106
options : {
90
107
dest : 'CHANGELOG.md'
@@ -111,6 +128,8 @@ module.exports = function(grunt) {
111
128
112
129
grunt . loadNpmTasks ( 'grunt-zip' ) ;
113
130
131
+ grunt . loadNpmTasks ( 'grunt-coveralls' ) ;
132
+
114
133
115
134
// Default task.
116
135
grunt . registerTask ( 'default' , [ 'build' ] ) ;
Original file line number Diff line number Diff line change 1
1
#Restangular
2
2
3
3
[ ![ Build Status] ( https://travis-ci.org/mgonto/restangular.svg?branch=master )] ( https://travis-ci.org/mgonto/restangular )
4
+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/mgonto/restangular/badge.svg?branch=master )] ( https://coveralls.io/github/mgonto/restangular?branch=master )
4
5
[ ![ PayPayl donate button] ( https://img.shields.io/badge/paypal-donate-yellow.svg )] ( https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=martin%40gon%2eto&lc=US&item_name=Martin%20Gontovnikas¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted " Donate once-off to this project using Paypal ")
5
6
[ ![ Donate on Gittip] ( http://img.shields.io/gittip/mgonto.svg )] ( https://www.gittip.com/mgonto/ )
6
7
<a href =" https://twitter.com/intent/tweet?hashtags=&original_referer=http%3A%2F%2Fgithub.com%2F&text=Check+out+Restangular%2C+a+service+for+%23AngularJS+that+makes+it+easy+to+use+Rest+APIs&tw_p=tweetbutton&url=https%3A%2F%2Fgithub.com%2Fmgonto%2Frestangular " target =" _blank " >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module.exports = function (config) {
29
29
30
30
// test results reporter to use
31
31
// possible values: 'dots', 'progress', 'junit'
32
- reporters : [ 'mocha' ] ,
32
+ reporters : [ 'mocha' , 'coverage' ] ,
33
33
34
34
35
35
// web server port
@@ -70,7 +70,20 @@ module.exports = function (config) {
70
70
71
71
// Continuous Integration mode
72
72
// if true, it capture browsers, run tests and exit
73
- singleRun : false
73
+ singleRun : false ,
74
+
75
+ preprocessors : {
76
+ // source files, that you wanna generate coverage for
77
+ // do not include tests or libraries
78
+ // (these files will be instrumented by Istanbul)
79
+ 'src/**/*.js' : [ 'coverage' ]
80
+ } ,
81
+
82
+ // optionally, configure the reporter
83
+ coverageReporter : {
84
+ type : 'lcov' ,
85
+ dir : 'coverage/'
86
+ }
74
87
75
88
} ) ;
76
89
} ;
Original file line number Diff line number Diff line change 37
37
"devDependencies" : {
38
38
"angular-mocks" : " ^1.4.8" ,
39
39
"grunt" : " ^0.4.5" ,
40
+ "grunt-bower" : " *" ,
41
+ "grunt-bower-task" : " *" ,
40
42
"grunt-cli" : " >= 0.1.7" ,
41
43
"grunt-contrib-concat" : " *" ,
42
44
"grunt-contrib-jshint" : " *" ,
43
45
"grunt-contrib-uglify" : " *" ,
44
- "grunt-bower" : " *" ,
45
- "grunt-bower-task" : " *" ,
46
- "grunt-karma" : " latest" ,
47
46
"grunt-conventional-changelog" : " 0.0.12" ,
47
+ "grunt-coveralls" : " ^1.0.1" ,
48
+ "grunt-karma" : " latest" ,
48
49
"grunt-zip" : " *" ,
49
50
"karma" : " ^0.13.19" ,
50
51
"karma-chrome-launcher" : " ~v2.0.0" ,
52
+ "karma-coverage" : " ^1.1.1" ,
51
53
"karma-firefox-launcher" : " ~v1.0.0" ,
52
54
"karma-jasmine" : " ~0.1.5" ,
53
55
"karma-mocha-reporter" : " 0.2.8" ,
You can’t perform that action at this time.
0 commit comments