forked from Ziv-Barber/officegen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
81 lines (70 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
var path = require ( 'path' );
/**
* List of grunt tasks.
* @namespace gruntfile
*/
module.exports = function ( grunt ) {
// We are checking how much time took each grunt task:
require ( 'time-grunt' ) ( grunt );
function lastModified ( minutes ) {
return function ( filepath ) {
var filemod = ( require ( 'fs' ).statSync ( filepath ) ).mtime;
var timeago = ( new Date () ).setDate ( (new Date () ).getMinutes () - minutes );
return ( filemod > timeago );
};
}
grunt.initConfig ({
pkg: grunt.file.readJSON ( 'package.json' ),
jshint: {
// List of all the source files to test:
files: [
'gruntfile.js',
'lib/**/*.js'
],
// Configure JSHint (documented at http://www.jshint.com/docs/):
options: {
evil: false,
multistr: true, // We need to take care about it.
globals: {
console: true,
module: true
}
}
},
jsdoc : {
dist : {
src: [
'gruntfile.js',
'lib/**/*.js'
],
options: {
'destination': 'doc',
'package': 'package.json',
'readme': 'README.md'
// template : "node_modules/grunt-jsdoc/node_modules/ink-docstrap/template",
// configure : "node_modules/grunt-jsdoc/node_modules/ink-docstrap/template/jsdoc.conf.json"
}
}
}
});
//
// The default task:
//
/**
* The default grunt task.
* @name default
* @memberof gruntfile
* @kind function
*/
grunt.registerTask ( 'default', [
'jshint'
]);
//
// More Grunt tasks:
//
//
// Load all the modules that we need:
//
grunt.loadNpmTasks ( 'grunt-contrib-jshint' );
grunt.loadNpmTasks ( 'grunt-jsdoc' );
};