forked from coreybutler/node-windows
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
60 lines (54 loc) · 1.9 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
/*global module:false*/
module.exports = function(grunt) {
var cfg = {};
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
jsduck: {
main: {
// source paths with your code
src: [
'./lib'
],
// docs output dir
dest: '../node-daemon-docs/manual',
// extra options
options: {
'title': 'node-windows',
//'welcome': 'src/assets/html/welcome.html',
'head-html': '<link rel="stylesheet" href="resources/css/main.css" type="text/css">',
//'categories': 'src/categories.json',
'guides': 'docs/guides.json',
'color': true,
'builtin-classes': true,
'warnings': ['-req_after_opt'],
'external': ['XMLHttpRequest']
}
}
},
clean: {
docs: ["../node-daemon-docs/manual"],
},
copy: {
jsduckassets: {
files: [
{expand: true, cwd: './docs/assets/css/', src:['*.*'], dest: '../node-daemon-docs/manual/resources/css/'},
{expand: true, cwd: './docs/assets/images/', src:['*.*'], dest: '../node-daemon-docs/manual/resources/images/'},
{expand: true, cwd: './docs/assets/images/', src:['tabs.png'], dest: '../node-daemon-docs/manual/resources/images/'}
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-jsduck');
grunt.loadNpmTasks('grunt-contrib-clean');
// Default task.
grunt.registerTask('default', ['clean:docs','jsduck','copy:jsduckassets']);
};