From fe392a08ff9aa62470ab143d4df45a5117386d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Mon, 8 Jun 2015 00:21:10 +0200 Subject: [PATCH] Collapse bindata tasks --- client/gulpfile.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/client/gulpfile.js b/client/gulpfile.js index d88008f2..b34f1bc1 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -108,6 +108,12 @@ gulp.task('gzip', ['html', 'css', 'js', 'fonts'], function() { .pipe(gulp.dest('dist/gz')); }); +gulp.task('gzip:watch', ['lint'], function() { + return gulp.src('dist/**/*.{html,css,js}') + .pipe(gzip()) + .pipe(gulp.dest('dist/gz')); +}); + function bindata(cb) { if (argv.production) { exec('go-bindata -nomemcopy -nocompress -pkg assets -o ../assets/bindata.go -prefix "dist/gz" dist/gz/...', cb); @@ -116,19 +122,8 @@ function bindata(cb) { } } -gulp.task('bindata', ['gzip', 'config'], function(cb) { - bindata(cb); -}); - -gulp.task('gzip:watch', ['lint'], function() { - return gulp.src('dist/**/*.{html,css,js}') - .pipe(gzip()) - .pipe(gulp.dest('dist/gz')); -}); - -gulp.task('bindata:watch', ['gzip:watch'], function(cb) { - bindata(cb); -}); +gulp.task('bindata', ['gzip', 'config'], bindata); +gulp.task('bindata:watch', ['gzip:watch'], bindata); gulp.task('watch', ['default'], function() { gulp.watch('dist/**/*.{html,css,js}', ['gzip:watch', 'bindata:watch'])