Skip to content

Commit 7bb4b6d

Browse files
authored
Update gulpfile.js
1 parent 8469572 commit 7bb4b6d

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

gulpfile.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var taskCompile = require('./gulp-tasks/compile.js');
2222
var taskMove = require('./gulp-tasks/move.js');
2323
var taskLint = require('./gulp-tasks/lint.js');
2424
var taskCompress = require('./gulp-tasks/compress.js');
25-
var taskClean = require('./gulp-tasks/clean.mjs');
25+
const taskCleanPromise = import('./gulp-tasks/clean.mjs');
2626

2727
var taskStyleGuide = require('./gulp-tasks/styleguide.js');
2828
var taskConcat = require('./gulp-tasks/concat.js');
@@ -103,29 +103,34 @@ gulp.task('concat', function () {
103103

104104

105105
// Clean style guide files.
106-
gulp.task('clean:styleguide', function () {
106+
gulp.task('clean:styleguide', async function () {
107+
const taskClean = await taskCleanPromise;
107108
return taskClean.styleguide();
108109
});
109110

110111
// Clean CSS files.
111-
gulp.task('clean:css', function () {
112+
gulp.task('clean:css', async function () {
113+
const taskClean = await taskCleanPromise;
112114
return taskClean.css();
113115
});
114116

115117
// Clean JS files.
116-
gulp.task('clean:js', function () {
118+
gulp.task('clean:js', async function () {
119+
const taskClean = await taskCleanPromise;
117120
return taskClean.js();
118121
});
119122

120123
// Clean Docs folder for new fresh documents.
121-
gulp.task('clean:docs', function() {
124+
gulp.task('clean:docs', async function () {
125+
const taskClean = await taskCleanPromise;
122126
return taskClean.docs();
123127
});
124128

125-
gulp.task('clean', function(callback){
126-
gulp.series(['clean:css', 'clean:js', 'clean:styleguide']);
127-
callback();
128-
});
129+
gulp.task('clean', gulp.series(
130+
'clean:css',
131+
'clean:js',
132+
'clean:styleguide'
133+
));
129134

130135
//=======================================================
131136
// Watch and recompile sass.

0 commit comments

Comments
 (0)