This repository was archived by the owner on Jan 15, 2024. It is now read-only.
forked from fshost/xrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
124 lines (105 loc) · 2.81 KB
/
gruntfile.js
File metadata and controls
124 lines (105 loc) · 2.81 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/**
* Cluster Build
*
* The path to the Vendor Repository Directory should be stored in the global "VENDOR_REPOSITORY_DIRECTORY" variables.
*
* @author potanin@UD
* @version 0.0.2
* @param grunt
*/
module.exports = function( grunt ) {
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
mochacli: {
options: {
require: [ 'should' ],
reporter: 'list',
ui: 'exports'
},
all: [ 'test/*.js' ]
},
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
logo: 'http://media.usabilitydynamics.com/logo.png',
options: {
paths: [ "./bin", "./lib" ],
outdir: './static/codex'
}
}
},
jscoverage: {
options: {
inputDirectory: 'lib',
outputDirectory: './static/lib-cov',
highlight: true
}
},
watch: {
options: {
interval: 1000,
debounceDelay: 500
},
docs: {
files: [ 'readme.md' ],
tasks: [ 'markdown' ]
}
},
markdown: {
all: {
files: [ {
expand: true,
src: 'readme.md',
dest: 'static/',
ext: '.html'
}
],
options: {
// preCompile: function preCompile( src, context ) {},
// postCompile: function postCompile( src, context ) {},
templateContext: {},
markdownOptions: {
highlight: 'manual',
gfm: true,
codeLines: {
before: '<span>',
after: '</span>'
}
}
}
}
},
clean: [],
shell: {
install: {},
update: {}
}
});
// Load tasks
grunt.loadNpmTasks( 'grunt-markdown' );
grunt.loadNpmTasks( 'grunt-mocha-cli' );
grunt.loadNpmTasks( 'grunt-jscoverage' );
grunt.loadNpmTasks( 'grunt-contrib-symlink' );
grunt.loadNpmTasks( 'grunt-contrib-yuidoc' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-shell' );
// Build Assets
grunt.registerTask( 'default', [ 'markdown', 'yuidoc', 'jscoverage', 'mochacli' ] );
// Install environment
grunt.registerTask( 'install', [ 'shell:pull', 'shell:install', 'yuidoc' ] );
// Update Environment
grunt.registerTask( 'update', [ 'shell:pull', 'shell:update', 'yuidoc' ] );
// Prepare distribution
grunt.registerTask( 'dist', [ 'clean', 'yuidoc', 'markdown' ] );
// Update Documentation
grunt.registerTask( 'doc', [ 'yuidoc', 'markdown' ] );
// Run Tests
grunt.registerTask( 'test', [ 'mochacli' ] );
// Developer Mode
grunt.registerTask( 'dev', [ 'watch' ] );
};