Add meetup-thumbnails task

This commit is contained in:
Oliver Davies 2016-03-22 21:51:51 +00:00
parent e2402b08bd
commit 5bf9842f41
3 changed files with 14 additions and 5 deletions

View file

@ -1,4 +1,4 @@
g = require 'gulp'
g.task 'build', ['clean'], ->
g.start 'fonts', 'styles', 'vendor'
g.start 'fonts', 'images', 'styles', 'vendor'

View file

@ -7,6 +7,7 @@ g.task 'clean', ->
'output_*/assets/js',
'source/assets/css',
'source/assets/fonts',
'source/assets/images/*/thumbnails',
'source/assets/js',
], read: false
.pipe g.p.clean()

View file

@ -1,6 +1,14 @@
g = require 'gulp'
g.task 'images', ->
g.src 'source/assets/images/*'
.pipe g.p.imagemin()
.pipe g.dest 'source/assets/images'
g.task 'images', -> g.start 'meetup-thumbnails', 'minify-images'
g.task 'meetup-thumbnails', ->
g.src 'source/assets/images/meetups/originals/*'
.pipe g.p.imageResize
height: 50
.pipe g.dest 'source/assets/images/meetups/thumbnails'
g.task 'minify-images', ->
g.src 'source/assets/images/*'
.pipe g.p.imagemin()
.pipe g.dest 'source/assets/images'