From d04a515eb01352c94fc9260edda61610cca7cb33 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 19 May 2015 21:53:06 -0700 Subject: [PATCH] build(gulp): refactor existing cleanup tasks the current complexity is unjustified necessary --- gulpfile.js | 19 +++++++++---------- tools/build/clean.js | 8 -------- 2 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 tools/build/clean.js diff --git a/gulpfile.js b/gulpfile.js index 1b62b2475e..0dade96de3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,7 +18,6 @@ var path = require('path'); var semver = require('semver'); var watch = require('./tools/build/watch'); -var clean = require('./tools/build/clean'); var transpile = require('./tools/build/transpile'); var pubget = require('./tools/build/pubget'); var linknodemodules = require('./tools/build/linknodemodules'); @@ -134,17 +133,17 @@ gulp.task('build/clean.tools', function() { del(path.join('dist', 'tools')); }); -gulp.task('build/clean.js', clean(gulp, gulpPlugins, { - path: CONFIG.dest.js.all -})); +gulp.task('build/clean.js', function(done) { + del(CONFIG.dest.js.all, done); +}); -gulp.task('build/clean.dart', clean(gulp, gulpPlugins, { - path: CONFIG.dest.dart -})); +gulp.task('build/clean.dart', function(done) { + del(CONFIG.dest.dart, done); +}); -gulp.task('build/clean.docs', clean(gulp, gulpPlugins, { - path: CONFIG.dest.docs -})); +gulp.task('build/clean.docs', function(done) { + del(CONFIG.dest.docs, done); +}); // ------------ diff --git a/tools/build/clean.js b/tools/build/clean.js deleted file mode 100644 index 1451f17ea4..0000000000 --- a/tools/build/clean.js +++ /dev/null @@ -1,8 +0,0 @@ -var del = require('del'); - -module.exports = function(gulp, plugins, config) { - return function(done) { - del(config.path, done); - }; -}; -