From 0612bd1a215da93cbb054c79fd45110ef545499b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 28 Sep 2017 15:14:08 +0200 Subject: [PATCH] Gulp: run 'cleanup' task when running with --production. --- gulpfile.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b90b9b0f..79b9d178 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -19,7 +19,8 @@ var enabled = { maps: argv.production, failCheck: !argv.production, prettyPug: !argv.production, - cachify: !argv.production + cachify: !argv.production, + cleanup: argv.production, }; var destination = { @@ -128,4 +129,12 @@ gulp.task('cleanup', function() { // Run 'gulp' to build everything at once -gulp.task('default', ['styles', 'templates', 'scripts', 'scripts_concat_tutti', 'scripts_concat_markdown']); +var tasks = []; +if (enabled.cleanup) tasks.push('cleanup'); +gulp.task('default', tasks.concat([ + 'styles', + 'templates', + 'scripts', + 'scripts_concat_tutti', + 'scripts_concat_markdown', +]));