summaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 20ca3b1..f6334a3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -26,10 +26,10 @@
26 // List of file paths. 26 // List of file paths.
27 var paths = { 27 var paths = {
28 'html': dir.src + '/**/*.html', 28 'html': dir.src + '/**/*.html',
29 'hbs': dir.src + '/index.hbs',
30 'index': dir.src + '/index.hbs', 29 'index': dir.src + '/index.hbs',
31 'css': dir.src + '/css/**/*.css', 30 'css': dir.src + '/css/**/*.css',
32 'js': dir.src + '/js/**/*.js', 31 'js': dir.src + '/js/**/*.js',
32 'talks': dir.src + '/talks',
33 'images': [ 33 'images': [
34 dir.src + '/**/*.png', 34 dir.src + '/**/*.png',
35 dir.src + '/**/*.gif', 35 dir.src + '/**/*.gif',
@@ -62,10 +62,10 @@
62 */ 62 */
63 function buildPresentationManifest () { 63 function buildPresentationManifest () {
64 var presentations = []; 64 var presentations = [];
65 var files = fs.readdirSync(dir.src); 65 var files = fs.readdirSync(paths.talks);
66 66
67 for (var i = 0; i < files.length; i++) { 67 for (var i = 0; i < files.length; i++) {
68 var file = dir.src + '/' + files[i] + '/index.html'; 68 var file = paths.talks + '/' + files[i] + '/index.html';
69 try { 69 try {
70 var stat = fs.statSync(file); 70 var stat = fs.statSync(file);
71 var $ = cheerio.load(fs.readFileSync(file)); 71 var $ = cheerio.load(fs.readFileSync(file));
@@ -163,7 +163,7 @@
163 /** 163 /**
164 * Package the handlebars files. 164 * Package the handlebars files.
165 */ 165 */
166 gulp.task('package:hbs', function () { 166 gulp.task('package:talks', function () {
167 167
168 var templateData = { 168 var templateData = {
169 'presentations': buildPresentationManifest(), 169 'presentations': buildPresentationManifest(),
@@ -171,7 +171,7 @@
171 }; 171 };
172 172
173 // Automatically build the site list. 173 // Automatically build the site list.
174 return gulp.src(paths.hbs, {'base': dir.src}) 174 return gulp.src(paths.talks + '/index.hbs', {'base': dir.src})
175 .pipe(handlebars(templateData, handlebarsConfig)) 175 .pipe(handlebars(templateData, handlebarsConfig))
176 .pipe(rename(function (path) { 176 .pipe(rename(function (path) {
177 path.extname = ".html"; 177 path.extname = ".html";
@@ -247,7 +247,7 @@
247 /** 247 /**
248 * Package the entire site into the dist folder. 248 * Package the entire site into the dist folder.
249 */ 249 */
250 gulp.task('package', ['package:html', 'package:hbs', 'package:libs', 250 gulp.task('package', ['package:html', 'package:talks', 'package:libs',
251 'package:images', 'package:css', 'package:js']); 251 'package:images', 'package:css', 'package:js']);
252 252
253 gulp.task('rsync', function () { 253 gulp.task('rsync', function () {
@@ -272,7 +272,7 @@
272 gulp.task('serve', function () { 272 gulp.task('serve', function () {
273 gulp.watch(paths.html, ['package:html']); 273 gulp.watch(paths.html, ['package:html']);
274 gulp.watch(paths.images, ['package:images']); 274 gulp.watch(paths.images, ['package:images']);
275 gulp.watch(paths.hbs, ['package:hbs']); 275 gulp.watch(paths.hbs, ['package:talks']);
276 gulp.watch(paths.css, ['package:css']); 276 gulp.watch(paths.css, ['package:css']);
277 gulp.watch(paths.js, ['package:js']); 277 gulp.watch(paths.js, ['package:js']);
278 278