forked from mazerte/grunt-jscpd
/
Gruntfile.js
51 lines (43 loc) · 1.04 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
'use strict';
module.exports = function(grunt) {
// Load local tasks.
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-mocha-test');
// Project configuration.
grunt.initConfig({
jscpd: {
javascript: {
path: 'test/fixtures/',
output: 'test/js-output.xml'
},
coffeescript: {
options: {
coffee: true
},
path: 'test/fixtures/',
output: 'test/coffee-output.xml'
},
javascriptWithExcludeString: {
path: 'test/fixtures/',
output: 'test/js-exclude-string-output.xml',
exclude: 'file_3.js'
},
javascriptWithExcludeArray: {
path: 'test/fixtures/',
output: 'test/js-exclude-array-output.xml',
exclude: ['file_2.js', 'file_3.js']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/**/test-*.js']
}
}
});
// Default task.
grunt.registerTask('default', ['jscpd']);
grunt.registerTask('test', ['jscpd', 'mochaTest']);
};