forked from awslabs/amazon-kinesis-client-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
95 lines (84 loc) · 1.96 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/***
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
***/
'use strict';
function mochaCoverageOptions(reporterName, outFile) {
return {
options: {
reporter: reporterName,
quiet: true,
captureFile: outFile
},
src: ['test/**/*_tests.js']
};
}
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: 'conf/.jshintrc'
},
gruntfile: {
src: 'Gruntfile.js'
},
bin: {
src: ['bin/kcl-bootstrap']
},
lib: {
src: ['index.js', 'lib/**/*.js']
},
test: {
src: ['test/**/*.js']
},
samples: {
src: ['samples/**/*.js']
}
},
clean: {
build: {
options: {
force: true
},
src: ['build']
},
doc: {
options: {
force: true
},
src: ['doc']
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
clearRequireCache: true,
},
src: ['test/**/*_tests.js']
}
},
jsdoc: {
dist: {
src: ['index.js', 'lib/**/*.js', 'README.md'],
jsdoc: 'node_modules/grunt-jsdoc/node_modules/jsdoc/jsdoc',
options: {
destination: 'doc',
configure: 'conf/jsdoc.conf.json',
template: 'node_modules/ink-docstrap/template'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('build', 'compile');
grunt.registerTask('compile', ['jshint']);
// clean task already defined above.
grunt.registerTask('doc', 'jsdoc');
grunt.registerTask('test', ['jshint', 'mochaTest']);
grunt.registerTask('release', ['jshint', 'mochaTest', 'jsdoc']);
};