-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
66 lines (63 loc) · 1.59 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
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'index.js',
'lib/*.js',
],
options: {
jshintrc: '.jshintrc'
}
},
jasmine_nodejs: {
options: {
specNameSuffix: 'spec.js',
useHelpers: false,
reporters: {
console: {}
},
customReporters: [
require('./tests/lib/istanbul-reporter.js').init({
instrumenting: {
coverageVariable: '__coverage__'
},
reporting: {
dir: './tests/coverage',
reports: ['text','lcov','html']
}
})
]
},
default: {
specs: [ 'tests/unit/**' ]
}
},
jsdoc2md: {
oneOutputFile: {
options: {
'module-index-format': 'none',
'heading-depth': 3,
'name-format': 'code',
'param-list-format': 'list',
partial: ['doc/*.hbs'],
template: grunt.file.read('doc/readme.hbs')
},
src: ['index.js', 'lib/Loaded.js', 'lib/iconize.js'],
dest: 'README.md'
}
},
coveralls: {
default: {
src: 'tests/coverage/*.info',
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jasmine-nodejs');
grunt.loadNpmTasks('grunt-jsdoc-to-markdown');
grunt.loadNpmTasks('grunt-coveralls');
grunt.registerTask('test', ['jshint', 'jasmine_nodejs']);
grunt.registerTask('build', ['jsdoc2md', 'coveralls']);
};