-
Notifications
You must be signed in to change notification settings - Fork 105
/
Gruntfile.js
44 lines (42 loc) · 1.19 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
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
eslint: {
src: ['lib/*.js', 'lib/**/*.js'],
options: {
overrideConfigFile: '.eslintrc.json',
},
},
mochaTest: {
src: ['test/test-*.js'],
options: {
reporter: 'dot',
},
},
nyc_mocha: {
src: ['test/test-*.js'],
options: {
nyc: {
coverage: {
dir: 'dist/coverage',
reporter: ['text', 'html', 'lcov', 'cobertura'],
},
},
mocha: {
color: true,
opts: ['--reporter', 'dot'],
},
},
},
coveralls: {
src: 'dist/coverage/*.info',
options: {},
},
});
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-nyc-mocha');
grunt.loadNpmTasks('grunt-coveralls');
grunt.registerTask('test', ['eslint', 'mochaTest']);
grunt.registerTask('coverage', ['nyc_mocha']);
};