From 00529ffd5c02beb49c93dba455ff210b5cc21e2b Mon Sep 17 00:00:00 2001 From: exane Date: Fri, 3 Jul 2015 15:16:21 +0200 Subject: [PATCH] reverse gulp... --- gulpfile.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 29f547d..a5b5095 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -81,12 +81,29 @@ gulp.task("index", function(){ }) gulp.task('resize sm', function(done){ - + if(fs.existsSync(__dirname + "/assets/cards/sm/monster/arachas1.png")) { + console.log("skip generating sm images"); return done(); + } + return gulp.src('./assets/original_cards/**/*.png') + .pipe(gm(function(gmfile){ + return gmfile.resize(null, 120); + })) + .pipe(imagemin()) + .pipe(gulp.dest('./assets/cards/sm/')); }); gulp.task('resize lg', ["resize sm"], function(done){ + if(fs.existsSync(__dirname + "/assets/cards/lg/monster/arachas1.png")) { + console.log("skip generating lg images"); return done(); + } + return gulp.src('./assets/original_cards/**/*.png') + .pipe(gm(function(gmfile){ + return gmfile.resize(null, 450); + })) + .pipe(imagemin()) + .pipe(gulp.dest('./assets/cards/lg/')); }); gulp.task("sprite", ["resize lg"], function(){