forked from Ziv-Barber/officegen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
87 lines (75 loc) · 1.6 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
83
84
85
86
87
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 = ( curDate ).setMinutes ( ( curDate ).getMinutes () - minutes );
return ( filemod > timeago );
};
}
grunt.initConfig ({
pkg: grunt.file.readJSON ( 'package.json' ),
jshint: {
files: {
// List of all the source files to test:
src: [
'gruntfile.js',
'index.js',
'lib/**/*.js'
],
// Run only on files been modified on the last day:
// filter: lastModified ( 24 * 60 )
},
// 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',
'index.js',
'lib/**/*.js'
],
options: {
destination: 'doc',
package: 'package.json',
readme: 'README.md',
template: './node_modules/jaguarjs-jsdoc'
}
}
}
});
//
// 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' );
};