forked from FabMo/FabMo-Engine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
55 lines (54 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'groc': {
javascript: ["*.js", "*.md", "*/*.js", "*/*.md"],
options: {
"out": "docs-dist/"
},
},
'gh-pages': {
options: {
base: 'docs-dist'
},
src: ['**']
},
'open' : {
'file' : {
path : 'docs-dist/index.html'
}
},
'availabletasks' : {
'tasks' : {
options: {
showTasks: ['user'],
filter: 'exclude',
tasks: ['availabletasks', 'default']
}
}
},
'mochaTest' : {
test:{
src: ["test/*.js"]
}
},
'apidoc' : {
myapp: {
src: "routes",
dest: "docs-dist/api",
debug: true
}
}
});
grunt.loadNpmTasks('grunt-groc');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-available-tasks');
grunt.loadNpmTasks('grunt-apidoc');
grunt.registerTask('doc', 'Generate engine documentation in HTML format.', ['groc', 'apidoc']);
grunt.registerTask('doc-dist', 'Generate documentation and publish to github-pages.', ['groc', 'apidoc', 'gh-pages']);
grunt.registerTask('doc-view', 'Generate documentation and view locally in web browser.', ['groc', 'apidoc', 'open']);
grunt.registerTask('test', 'Run tests.', 'mochaTest');
grunt.registerTask('default', 'availabletasks');
};