diff options
author | Monty Taylor <mordred@inaugust.com> | 2015-08-01 00:35:39 +1000 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2015-08-01 00:35:39 +1000 |
commit | e51d88e3bcda4f4cfd5173ff1d6dc58f37fd96ca (patch) | |
tree | 789250d13f6a1bcc849f00f0206972ad7742dddc /gulpfile.js | |
parent | fb9c02623e72c9bf6c8dffb8cdac7f7fc0ac1823 (diff) |
Get first talk mostly working
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/gulpfile.js b/gulpfile.js index ccd1732..20ca3b1 100644 --- a/gulpfile.js +++ b/gulpfile.js | |||
@@ -28,6 +28,8 @@ | |||
28 | 'html': dir.src + '/**/*.html', | 28 | 'html': dir.src + '/**/*.html', |
29 | 'hbs': dir.src + '/index.hbs', | 29 | 'hbs': dir.src + '/index.hbs', |
30 | 'index': dir.src + '/index.hbs', | 30 | 'index': dir.src + '/index.hbs', |
31 | 'css': dir.src + '/css/**/*.css', | ||
32 | 'js': dir.src + '/js/**/*.js', | ||
31 | 'images': [ | 33 | 'images': [ |
32 | dir.src + '/**/*.png', | 34 | dir.src + '/**/*.png', |
33 | dir.src + '/**/*.gif', | 35 | dir.src + '/**/*.gif', |
@@ -103,10 +105,6 @@ | |||
103 | .pipe(filter('*.css')) | 105 | .pipe(filter('*.css')) |
104 | .pipe(gulp.dest(dir.dist + '/css')); | 106 | .pipe(gulp.dest(dir.dist + '/css')); |
105 | 107 | ||
106 | var resolveLocalCSS = gulp.src(dir.src + '/css/**/*') | ||
107 | .pipe(filter('*.css')) | ||
108 | .pipe(gulp.dest(dir.dist + '/css')); | ||
109 | |||
110 | var resolveLESS = gulp.src(bowerFiles) | 108 | var resolveLESS = gulp.src(bowerFiles) |
111 | .pipe(filter('*.less')) | 109 | .pipe(filter('*.less')) |
112 | .pipe(less()) | 110 | .pipe(less()) |
@@ -120,10 +118,6 @@ | |||
120 | .pipe(filter('*.js')) | 118 | .pipe(filter('*.js')) |
121 | .pipe(gulp.dest(dir.dist + '/js')); | 119 | .pipe(gulp.dest(dir.dist + '/js')); |
122 | 120 | ||
123 | var resolveLocalLibs = gulp.src(dir.src + '/js/**/*') | ||
124 | .pipe(filter('*.js')) | ||
125 | .pipe(gulp.dest(dir.dist + '/js')); | ||
126 | |||
127 | // Reveal.js is a special snowflake. | 121 | // Reveal.js is a special snowflake. |
128 | var resolveReveal = gulp.src('./bower_components/reveal.js/*/**/*.*', | 122 | var resolveReveal = gulp.src('./bower_components/reveal.js/*/**/*.*', |
129 | {'base': './bower_components/reveal.js/'}) | 123 | {'base': './bower_components/reveal.js/'}) |
@@ -137,9 +131,9 @@ | |||
137 | ])) | 131 | ])) |
138 | .pipe(gulp.dest(dir.dist)); | 132 | .pipe(gulp.dest(dir.dist)); |
139 | 133 | ||
140 | return streamqueue({'objectMode': true}, resolveCSS, resolveLocalCSS, | 134 | return streamqueue({'objectMode': true}, resolveCSS, |
141 | resolveLESS, resolveReveal, | 135 | resolveLESS, resolveReveal, |
142 | resolveLibs, resolveLocalLibs, resolveFonts); | 136 | resolveLibs, resolveFonts); |
143 | }); | 137 | }); |
144 | 138 | ||
145 | /** | 139 | /** |
@@ -151,6 +145,22 @@ | |||
151 | }); | 145 | }); |
152 | 146 | ||
153 | /** | 147 | /** |
148 | * Package all css. | ||
149 | */ | ||
150 | gulp.task('package:css', function () { | ||
151 | return gulp.src(paths.css, {'base': dir.src}) | ||
152 | .pipe(gulp.dest(dir.dist)); | ||
153 | }); | ||
154 | |||
155 | /** | ||
156 | * Package all js. | ||
157 | */ | ||
158 | gulp.task('package:js', function () { | ||
159 | return gulp.src(paths.js, {'base': dir.src}) | ||
160 | .pipe(gulp.dest(dir.dist)); | ||
161 | }); | ||
162 | |||
163 | /** | ||
154 | * Package the handlebars files. | 164 | * Package the handlebars files. |
155 | */ | 165 | */ |
156 | gulp.task('package:hbs', function () { | 166 | gulp.task('package:hbs', function () { |
@@ -238,7 +248,7 @@ | |||
238 | * Package the entire site into the dist folder. | 248 | * Package the entire site into the dist folder. |
239 | */ | 249 | */ |
240 | gulp.task('package', ['package:html', 'package:hbs', 'package:libs', | 250 | gulp.task('package', ['package:html', 'package:hbs', 'package:libs', |
241 | 'package:images']); | 251 | 'package:images', 'package:css', 'package:js']); |
242 | 252 | ||
243 | gulp.task('rsync', function () { | 253 | gulp.task('rsync', function () { |
244 | gulp.src('dest/**') | 254 | gulp.src('dest/**') |
@@ -263,6 +273,8 @@ | |||
263 | gulp.watch(paths.html, ['package:html']); | 273 | gulp.watch(paths.html, ['package:html']); |
264 | gulp.watch(paths.images, ['package:images']); | 274 | gulp.watch(paths.images, ['package:images']); |
265 | gulp.watch(paths.hbs, ['package:hbs']); | 275 | gulp.watch(paths.hbs, ['package:hbs']); |
276 | gulp.watch(paths.css, ['package:css']); | ||
277 | gulp.watch(paths.js, ['package:js']); | ||
266 | 278 | ||
267 | return gulp.src(dir.dist) | 279 | return gulp.src(dir.dist) |
268 | .pipe(webserver({ | 280 | .pipe(webserver({ |