-
Notifications
You must be signed in to change notification settings - Fork 95
/
Gruntfile.js
56 lines (49 loc) · 1.12 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
/**
* http://gruntjs.com/configuring-tasks
*/
module.exports = function(grunt) {
var path = require('path');
var DOC_PATH = 'dist';
var SOURCE_PATH = 'lib';
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
connect : {
options : {
hostname : '*'
},
docs : {
options : {
port : 8000,
base : DOC_PATH,
middleware : function(connect, options) {
return [ require('connect-livereload')(), connect.static(path.resolve(options.base)) ];
}
}
}
},
clean : {
docs : {
src : DOC_PATH
}
},
jsdoc : {
docs : {
src : [ SOURCE_PATH + '/**/*.js',
// You can add README.md file for index page at documentations.
'Readme.md' ],
options : {
verbose : true,
destination : DOC_PATH,
configure : 'conf.json',
template : 'node_modules/jaguarjs-jsdoc',
'private' : false
}
}
},
});
// Load task libraries
[ 'grunt-contrib-clean', 'grunt-jsdoc', ].forEach(function(taskName) {
grunt.loadNpmTasks(taskName);
});
grunt.registerTask('docs', 'Create documentation for mikronode', [ 'clean:docs', 'jsdoc:docs' ]);
};