forked from krampstudio/grunt-jsdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
83 lines (73 loc) · 2.83 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
module.exports = function(grunt) {
'use strict';
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
clean: {
options: {
force : true
},
test: ['doc']
},
jsdoc: {
basic: {
src: ['tasks/**.js', 'tasks/lib/*.js'],
options: {
destination: 'doc/basic'
}
},
alternate: {
src: ['tasks'],
dest : 'doc/alternate',
options: {
readme : 'README.md',
recurse : true,
private : false
}
},
spacepack: {
src: ['tasks/**/*.js'],
options: {
destination: 'doc/pack age',
package: 'package.json'
}
},
docstrap: {
src: ['tasks/**.js', 'tasks/lib/*.js', 'README.md'],
options: {
destination: 'doc/docstrap',
template: 'node_modules/ink-docstrap/template',
configure: 'node_modules/ink-docstrap/template/jsdoc.conf.json'
}
},
nosrc : {
options: {
configure : 'test/nosrc.json'
}
}
},
nodeunit: {
unit: ['test/jsdoc-plugin_test.js'],
basic: ['test/jsdoc-basic_test.js'],
alternate: ['test/jsdoc-alternate_test.js'],
docstrap: ['test/jsdoc-docstrap_test.js'],
spacepack: ['test/jsdoc-spacepack_test.js'],
nosrc: ['test/jsdoc-nosrc_test.js']
},
eslint: {
all: {
src: ['Gruntfile.js', 'tasks/**/*.js', 'test/**/*.js']
}
}
});
// Load local tasks.
grunt.loadTasks('tasks');
//testing tasks
grunt.registerTask('test-basic', 'Test basic jsdoc', ['jsdoc:basic', 'nodeunit:basic']);
grunt.registerTask('test-alternate', 'Test jsdoc with alternate options', ['jsdoc:alternate', 'nodeunit:alternate']);
grunt.registerTask('test-docstrap', 'Test jsdoc with a template', ['jsdoc:docstrap', 'nodeunit:docstrap']);
grunt.registerTask('test-spacepack', 'Test jsdoc with a package and spaces in the paths', ['jsdoc:spacepack', 'nodeunit:spacepack']);
grunt.registerTask('test-nosrc', 'Test jsdoc without src and dest, only a config', ['jsdoc:nosrc', 'nodeunit:nosrc']);
grunt.registerTask('test', 'Full test suite', ['clean:test', 'nodeunit:unit', 'test-basic', 'test-alternate', 'test-docstrap', 'test-spacepack', 'test-nosrc']);
grunt.registerTask('default', 'Default task will lint and test', ['eslint:all', 'test']);
};