From db38c1723b05ec9ad2b5fd936ffd2c6fc63a0958 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Sat, 19 Dec 2015 14:22:18 -0500 Subject: [PATCH] #3405 - formatting --- tasks/build/css.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tasks/build/css.js b/tasks/build/css.js index 75f43a6e5..2c53659f6 100644 --- a/tasks/build/css.js +++ b/tasks/build/css.js @@ -28,6 +28,13 @@ var tasks = require('../config/tasks'), install = require('../config/project/install'), + maybeCallback = function() { + if (completeCount === 1) { + callback(); + } + completeCount++; + }, + // shorthand globs = config.globs, assets = config.paths.assets, @@ -59,12 +66,6 @@ module.exports = function(callback) { return; } - function complete() { - if (++completeCount === 2) { - callback() - } - } - // unified css stream stream = gulp.src(source.definitions + '/**/' + globs.components + '.less') .pipe(plumber(settings.plumber.less)) @@ -90,7 +91,7 @@ module.exports = function(callback) { .pipe(gulp.dest(output.uncompressed)) .pipe(print(log.created)) .on('end', function() { - runSequence('package uncompressed css', complete); + runSequence('package uncompressed css', maybeCallback); }) ; @@ -105,8 +106,8 @@ module.exports = function(callback) { .pipe(gulp.dest(output.compressed)) .pipe(print(log.created)) .on('end', function() { - runSequence('package compressed css', complete); + runSequence('package compressed css', maybeCallback); }) ; -}; \ No newline at end of file +};