forked from automenta/netjs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gruntfile.js
65 lines (56 loc) · 1.94 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
module.exports = function(grunt){
grunt.initConfig({
mocha_istanbul: {
coverage: {
src: 'server/test', // the folder, not the files,
options: {
mask: '*.js'
}
},
coveralls: {
src: 'server/test', // the folder, not the files
options: {
coverage:true,
check: {
lines: 75,
statements: 75
},
root: './', // define where the cover task should consider the root of libraries that are covered by tests
reportFormats: ['cobertura','lcovonly']
}
}
},
plato: {
your_task: {
files: {
'coverage': ['client/*.js', 'server/*.js', 'util/*.js']
}
}
},
csslint: {
options: {
formatters: [
{id: 'junit-xml', dest: 'coverage/csslint_junit.xml'},
{id: 'csslint-xml', dest: 'coverage/csslint.xml'}
]
},
strict: {
options: {
import: 2
},
src: [ 'client/netention.css' ] //, 'client/**/*.css' ]
},
//lax: { options: { import: false }, src: ['path/to/**/*.css'] }
}
});
grunt.event.on('coverage', function(lcovFileContents, done){
// Check below
done();
});
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.loadNpmTasks('grunt-plato');
grunt.loadNpmTasks('grunt-contrib-csslint');
//grunt.registerTask('coveralls', ['mocha_istanbul:coveralls']);
grunt.registerTask('analyze', ['mocha_istanbul:coverage', 'plato' ]);
//TODO: https://www.npmjs.org/package/grunt-cordovacli
};