forked from OverloadUT/alexa-plex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
76 lines (72 loc) · 2.06 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
lambda_invoke: {
default: {
options: {
file_name: "<%= pkg.main %>"
}
}
},
lambda_package: {
default: {
options: {
file_name: "<%= pkg.main %>"
}
}
},
mochaTest: {
test: {
options: {},
src: ['test/**/*.js']
}
},
mocha_istanbul: {
coverage: {
src: 'test',
options: {}
},
coveralls: {
src: ['test'], // multiple folders also works
options: {
coverage:true, // this will make the grunt.event.on('coverage') event listener to be triggered
check: {
lines: 0,
statements: 0
},
reportFormats: ['cobertura','lcovonly']
}
}
},
lambda_deploy: {
default: {
options: {
file_name: "<%= pkg.main %>"
}
}
},
shell: {
deploy: {
command: 'deploy.bat'
}
},
});
// Coveralls support
grunt.event.on('coverage', function(lcov, done){
require('coveralls').handleInput(lcov, function(err){
if (err) {
return done(err);
}
done();
});
});
grunt.loadNpmTasks('grunt-aws-lambda');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-mocha-istanbul');
// Default task(s).
grunt.registerTask('default', ['mocha_istanbul:coverage']);
grunt.registerTask('coverage', ['mocha_istanbul:coverage']);
grunt.registerTask('coveralls', ['mocha_istanbul:coveralls']);
};