-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
85 lines (75 loc) · 2.13 KB
/
Gruntfile.js
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* grunt-coveralls
* https://github.com/pimterry/grunt-coveralls
*
* Copyright (c) 2013 Tim Perry
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'test/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
coveralls: {
basic_test: {
src: 'test/fixtures/lcov.info'
},
basic_test_force: {
src: 'test/fixtures/lcov.info',
options: {
force: true
}
},
multiple_files_test: {
src: ['test/fixtures/lcov.info', 'test/fixtures/lcov2.info']
},
missing_file_test: {
src: 'test/fixtures/nonexistent_lcov.info'
},
some_missing_files_test: {
src: ['test/fixtures/lcov.info', 'test/fixtures/nonexistent_lcov.info']
},
all_missing_files_test: {
src: ['test/fixtures/nonexistent_lcov1.info', 'test/fixtures/nonexistent_lcov2.info']
},
grunt_coveralls_real_coverage: {
src: 'coverage/lcov.info'
}
},
nodeunit: {
tests: ['test/*_test.js']
},
watch: {
options: {
spawn: false
},
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint']
},
lib: {
files: 'tasks/*.js',
tasks: ['test']
},
test: {
files: 'test/*js',
tasks: ['test']
}
}
});
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.registerTask('default', ['test']);
grunt.registerTask('test', ['jshint', 'nodeunit']);
};