diff options
| -rw-r--r-- | gulpfile.js | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gulpfile.js b/gulpfile.js index 9a39ebb..ccd1732 100644 --- a/gulpfile.js +++ b/gulpfile.js | |||
| @@ -27,7 +27,14 @@ | |||
| 27 | var paths = { | 27 | var paths = { |
| 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 | 'images': [ | ||
| 32 | dir.src + '/**/*.png', | ||
| 33 | dir.src + '/**/*.gif', | ||
| 34 | dir.src + '/**/*.jpg', | ||
| 35 | dir.src + '/**/*.jpeg', | ||
| 36 | dir.src + '/**/*.svg' | ||
| 37 | ] | ||
| 31 | }; | 38 | }; |
| 32 | 39 | ||
| 33 | // Contents of all our bower dependencies' main:[] fields. | 40 | // Contents of all our bower dependencies' main:[] fields. |
| @@ -136,6 +143,14 @@ | |||
| 136 | }); | 143 | }); |
| 137 | 144 | ||
| 138 | /** | 145 | /** |
| 146 | * Package all images. | ||
| 147 | */ | ||
| 148 | gulp.task('package:images', function () { | ||
| 149 | return gulp.src(paths.images, {'base': dir.src}) | ||
| 150 | .pipe(gulp.dest(dir.dist)); | ||
| 151 | }); | ||
| 152 | |||
| 153 | /** | ||
| 139 | * Package the handlebars files. | 154 | * Package the handlebars files. |
| 140 | */ | 155 | */ |
| 141 | gulp.task('package:hbs', function () { | 156 | gulp.task('package:hbs', function () { |
| @@ -222,7 +237,8 @@ | |||
| 222 | /** | 237 | /** |
| 223 | * Package the entire site into the dist folder. | 238 | * Package the entire site into the dist folder. |
| 224 | */ | 239 | */ |
| 225 | gulp.task('package', ['package:html', 'package:hbs', 'package:libs']); | 240 | gulp.task('package', ['package:html', 'package:hbs', 'package:libs', |
| 241 | 'package:images']); | ||
| 226 | 242 | ||
| 227 | gulp.task('rsync', function () { | 243 | gulp.task('rsync', function () { |
| 228 | gulp.src('dest/**') | 244 | gulp.src('dest/**') |
| @@ -245,6 +261,7 @@ | |||
| 245 | */ | 261 | */ |
| 246 | gulp.task('serve', function () { | 262 | gulp.task('serve', function () { |
| 247 | gulp.watch(paths.html, ['package:html']); | 263 | gulp.watch(paths.html, ['package:html']); |
| 264 | gulp.watch(paths.images, ['package:images']); | ||
| 248 | gulp.watch(paths.hbs, ['package:hbs']); | 265 | gulp.watch(paths.hbs, ['package:hbs']); |
| 249 | 266 | ||
| 250 | return gulp.src(dir.dist) | 267 | return gulp.src(dir.dist) |
