-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathGruntfile.js
More file actions
63 lines (60 loc) · 1.62 KB
/
Gruntfile.js
File metadata and controls
63 lines (60 loc) · 1.62 KB
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
'use strict';
/**
* Grunt configuration
* @param {import('grunt')} grunt - The Grunt instance
*/
module.exports = function (grunt) {
grunt.initConfig({
eslint: {
src: ['Gruntfile.js', 'tasks/*.js', 'lib/*.js', 'lib/**/*.js'],
options: {
overrideConfigFile: 'eslint.config.js',
},
},
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: {},
},
makeDts: {
options: {
config: 'tsconfig.json',
},
},
diffDts: {
options: {
config: 'tsconfig.json',
},
},
runTsdTest: {
options: {},
},
});
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-nyc-mocha');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadTasks('tasks');
grunt.registerTask('test', ['eslint', 'mochaTest', 'runTsdTest']);
grunt.registerTask('coverage', ['nyc_mocha']);
};