diff options
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/gulpfile.js b/gulpfile.js index 3bb9d6a..ccd1732 100644 --- a/gulpfile.js +++ b/gulpfile.js | |||
@@ -8,9 +8,9 @@ | |||
8 | 8 | ||
9 | var gulp = require('gulp'); | 9 | var gulp = require('gulp'); |
10 | var git = require('gulp-git'); | 10 | var git = require('gulp-git'); |
11 | var ghPages = require('gulp-gh-pages'); | ||
12 | var filter = require('gulp-filter'); | 11 | var filter = require('gulp-filter'); |
13 | var less = require('gulp-less'); | 12 | var less = require('gulp-less'); |
13 | var rsync = require('gulp-rsync'); | ||
14 | var webserver = require('gulp-webserver'); | 14 | var webserver = require('gulp-webserver'); |
15 | var streamqueue = require('streamqueue'); | 15 | var streamqueue = require('streamqueue'); |
16 | var ignore = require('gulp-ignore'); | 16 | var ignore = require('gulp-ignore'); |
@@ -69,7 +69,6 @@ | |||
69 | var $ = cheerio.load(fs.readFileSync(file)); | 69 | var $ = cheerio.load(fs.readFileSync(file)); |
70 | presentations.push({ | 70 | presentations.push({ |
71 | 'title': $("head title").text(), | 71 | 'title': $("head title").text(), |
72 | 'description': $("head meta[name='description']").attr('content'), | ||
73 | 'author': $('head meta[name="author"]').attr('content'), | 72 | 'author': $('head meta[name="author"]').attr('content'), |
74 | 'mtime': stat.mtime, | 73 | 'mtime': stat.mtime, |
75 | 'path': files[i] + '/index.html' | 74 | 'path': files[i] + '/index.html' |
@@ -104,6 +103,10 @@ | |||
104 | .pipe(filter('*.css')) | 103 | .pipe(filter('*.css')) |
105 | .pipe(gulp.dest(dir.dist + '/css')); | 104 | .pipe(gulp.dest(dir.dist + '/css')); |
106 | 105 | ||
106 | var resolveLocalCSS = gulp.src(dir.src + '/css/**/*') | ||
107 | .pipe(filter('*.css')) | ||
108 | .pipe(gulp.dest(dir.dist + '/css')); | ||
109 | |||
107 | var resolveLESS = gulp.src(bowerFiles) | 110 | var resolveLESS = gulp.src(bowerFiles) |
108 | .pipe(filter('*.less')) | 111 | .pipe(filter('*.less')) |
109 | .pipe(less()) | 112 | .pipe(less()) |
@@ -117,6 +120,10 @@ | |||
117 | .pipe(filter('*.js')) | 120 | .pipe(filter('*.js')) |
118 | .pipe(gulp.dest(dir.dist + '/js')); | 121 | .pipe(gulp.dest(dir.dist + '/js')); |
119 | 122 | ||
123 | var resolveLocalLibs = gulp.src(dir.src + '/js/**/*') | ||
124 | .pipe(filter('*.js')) | ||
125 | .pipe(gulp.dest(dir.dist + '/js')); | ||
126 | |||
120 | // Reveal.js is a special snowflake. | 127 | // Reveal.js is a special snowflake. |
121 | var resolveReveal = gulp.src('./bower_components/reveal.js/*/**/*.*', | 128 | var resolveReveal = gulp.src('./bower_components/reveal.js/*/**/*.*', |
122 | {'base': './bower_components/reveal.js/'}) | 129 | {'base': './bower_components/reveal.js/'}) |
@@ -130,8 +137,9 @@ | |||
130 | ])) | 137 | ])) |
131 | .pipe(gulp.dest(dir.dist)); | 138 | .pipe(gulp.dest(dir.dist)); |
132 | 139 | ||
133 | return streamqueue({'objectMode': true}, resolveCSS, resolveLESS, | 140 | return streamqueue({'objectMode': true}, resolveCSS, resolveLocalCSS, |
134 | resolveReveal, resolveLibs, resolveFonts); | 141 | resolveLESS, resolveReveal, |
142 | resolveLibs, resolveLocalLibs, resolveFonts); | ||
135 | }); | 143 | }); |
136 | 144 | ||
137 | /** | 145 | /** |
@@ -232,18 +240,18 @@ | |||
232 | gulp.task('package', ['package:html', 'package:hbs', 'package:libs', | 240 | gulp.task('package', ['package:html', 'package:hbs', 'package:libs', |
233 | 'package:images']); | 241 | 'package:images']); |
234 | 242 | ||
235 | /** | 243 | gulp.task('rsync', function () { |
236 | * Push the contents of the dist directory to gh-pages. | 244 | gulp.src('dest/**') |
237 | */ | 245 | .pipe(rsync({ |
238 | gulp.task('gh-pages', function () { | 246 | root: 'dest', |
239 | return gulp.src(dir.dist + '/**/*') | 247 | hostname: 'kleos.inaugust.com', |
240 | .pipe(ghPages()); | 248 | destination: '/var/www/inaugust.com/talks' |
249 | })); | ||
241 | }); | 250 | }); |
242 | |||
243 | /** | 251 | /** |
244 | * Build the current release package and push it to gh-pages. | 252 | * Build the current release package and push it |
245 | */ | 253 | */ |
246 | gulp.task('release', ['package', 'gh-pages']); | 254 | gulp.task('release', ['package', 'rsync']); |
247 | 255 | ||
248 | /** | 256 | /** |
249 | * Start a local server and serve the application code. This is | 257 | * Start a local server and serve the application code. This is |