build(gulp): refactor existing cleanup tasks
the current complexity is unjustified necessary
This commit is contained in:
parent
0ae89ac096
commit
d04a515eb0
19
gulpfile.js
19
gulpfile.js
|
@ -18,7 +18,6 @@ var path = require('path');
|
||||||
var semver = require('semver');
|
var semver = require('semver');
|
||||||
var watch = require('./tools/build/watch');
|
var watch = require('./tools/build/watch');
|
||||||
|
|
||||||
var clean = require('./tools/build/clean');
|
|
||||||
var transpile = require('./tools/build/transpile');
|
var transpile = require('./tools/build/transpile');
|
||||||
var pubget = require('./tools/build/pubget');
|
var pubget = require('./tools/build/pubget');
|
||||||
var linknodemodules = require('./tools/build/linknodemodules');
|
var linknodemodules = require('./tools/build/linknodemodules');
|
||||||
|
@ -134,17 +133,17 @@ gulp.task('build/clean.tools', function() {
|
||||||
del(path.join('dist', 'tools'));
|
del(path.join('dist', 'tools'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build/clean.js', clean(gulp, gulpPlugins, {
|
gulp.task('build/clean.js', function(done) {
|
||||||
path: CONFIG.dest.js.all
|
del(CONFIG.dest.js.all, done);
|
||||||
}));
|
});
|
||||||
|
|
||||||
gulp.task('build/clean.dart', clean(gulp, gulpPlugins, {
|
gulp.task('build/clean.dart', function(done) {
|
||||||
path: CONFIG.dest.dart
|
del(CONFIG.dest.dart, done);
|
||||||
}));
|
});
|
||||||
|
|
||||||
gulp.task('build/clean.docs', clean(gulp, gulpPlugins, {
|
gulp.task('build/clean.docs', function(done) {
|
||||||
path: CONFIG.dest.docs
|
del(CONFIG.dest.docs, done);
|
||||||
}));
|
});
|
||||||
|
|
||||||
|
|
||||||
// ------------
|
// ------------
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
var del = require('del');
|
|
||||||
|
|
||||||
module.exports = function(gulp, plugins, config) {
|
|
||||||
return function(done) {
|
|
||||||
del(config.path, done);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
Loading…
Reference in New Issue