Skip to content

task not waiting for dependency to finish #899

Closed
@tcurdt

Description

@tcurdt

Shouldn't this work?

var gulp = require('gulp');
var del = require('del');

...

gulp.task('clean', function(callback) {
  del([ site.build + '/**' ], callback);
});

gulp.task('build', [ 'clean' ], function() {
  return gulp.start('html', 'less', 'js', 'png', 'jpg');
});

gulp.task('deploy', [ 'build' ], function() {
 ...
});

Unfortunately deploy runs before build finished.

gulp.task('clean', function(callback) {
  del([ site.build + '/**' ], callback);
});

gulp.task('build', [ 'clean', 'html', 'less', 'js', 'png', 'jpg' ], function() {
});

gulp.task('deploy', [ 'build' ], function() {
 ...
});

The above does not work either as clean is run in parallel.

So what's the suggested way of doing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions