forked from avantassel/node-rets-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
80 lines (71 loc) · 1.57 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
/**
* Build Module.
*
* @author potanin@UD
* @version 1.2.1
* @param grunt
*/
module.exports = function( grunt ) {
// Build Configuration.
grunt.initConfig({
// Get Package.
pkg: grunt.file.readJSON( 'package.json' ),
// Generate YUIDoc documentation.
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
paths: 'lib',
outdir: 'static/codex/'
}
}
},
// Watch for Development.
watch: {
options: {
interval: 100,
debounceDelay: 500
},
yuidoc: {
files: [ 'lib/*.js' ],
tasks: [ 'yuidoc' ]
},
markdown: {
files: [ 'readme.md' ],
tasks: [ 'markdown' ]
}
},
// Generate Markdown Documentation.
markdown: {
all: {
files: [
{
expand: true,
src: 'readme.md',
dest: 'static/',
ext: '.html'
}
],
options: {
markdownOptions: {
gfm: true,
codeLines: {
before: '<span>',
after: '</span>'
}
}
}
}
}
});
// Load NPM Tasks.
grunt.loadNpmTasks( 'grunt-contrib-yuidoc' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-markdown' );
// Register NPM Tasks.
grunt.registerTask( 'default', [ 'markdown', 'yuidoc' ] );
};