OverZealous / run-sequence

Run a series of dependent gulp tasks in order
MIT License
961 stars 56 forks source link

Possiblity to add conditional tasks #61

Closed lowik closed 8 years ago

lowik commented 8 years ago

To write something like this

gulp.task('compile', function() {
    var enableLint = !args['disable-lint'];
    return runSequence(
        enableLint && 'lint',
        'babel',
        'copy'
    );
}
OverZealous commented 8 years ago

This has come up before. I still don't agree with it.

I might be tempted to allow strict false or a valid task, but no other values (undefined/0/''). By explicitly requiring strict equality with false, it's a lot harder to have a silent error. Even then I'm not sure I want to go this route.

yairEO commented 8 years ago

@lowik - Thank you very much! I will erase @OverZealous's code and use yours swiftly.

@OverZealous - This blog post is for you.

OverZealous commented 8 years ago

I've decided I'm not going to implement this.