-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
105 lines (91 loc) · 2.33 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*global module:false, require:false*/
module.exports = function(grunt) {
"use strict";
var path = require('path'),
lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet,
folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Project configuration.
grunt.initConfig({
jade: {
prod: {
options: {
pretty: true,
files: ['slides/*.jade']
},
}
},
reveal: {
slideshow: {
options: {
slides: "slides",
build: "build",
temp: "temp",
assets: "assets",
cleanBuild: true,
title: "Design Overview",
description: "A Desgin Overview",
author: "Richard Bailey",
theme: "night",
syntax: "zenburn",
controls: true,
progress: true,
history: true,
center: true,
// default/cube/page/concave/zoom/linear/none
transition: "default"
}
}
},
watch: {
options: {
// Start a live reload server on the default port: 35729
livereload: true
},
jade: {
files: ['slides/*.jade'],
tasks: ["reveal:slideshow"]
},
gruntfile: {
files: ['Gruntfile.js'],
tasks: ["reveal:slideshow", "open"]
}
},
connect: {
livereload : {
options : {
port : 9001,
hostname: 'localhost',
base : './build',
middleware : function (connect, options) {
return [lrSnippet, folderMount(connect, options.base)]
}
}
}
},
open : {
reload : {
path : 'http://localhost:9001/'
}
},
build_gh_pages: {
ghPages: {
options: {
build_branch: "gh-pages",
dist: "build",
}
}
}
});
// To start editing your slideshow using livereload, run "grunt server"
grunt.registerTask("server", "Build and watch task", ["reveal:slideshow", "connect", "open", "watch"]);
// To create a build without livereload, run "grunt build"
grunt.registerTask("build", "Build task", ["reveal:slideshow"]);
// This task is for internal use with watch
grunt.registerTask("refresh", "Build and watch task", ["reveal:slideshow", "open"]);
// To deploy your slideshow to gh-pages, run "grunt deploy"
grunt.registerTask("deploy", "Deploy to gh-pages", ["reveal:slideshow", "build_gh_pages:ghPages"]);
};