Skip to content

Support array of conditions #37

@terinjokes

Description

@terinjokes

One currently has multiple options to support multiple conditions with gulp-if:

gif(PRODUCTION, gif('*.js', minify()));
gif(function(file) { return PRODUCTION && gulpmatch(file, '*.js'); }, minify());

But all of these (and more involving lazypipe), distract from the goal of this simple problem: matching a boolean condition with a glob condition.

I propose something similar to the following to allow multiple conditions without nesting gulp-if instances:

gif([PRODUCTION, '*.js'], minify());

I don't believe the above will work as is because it conflicts with the multiple glob support in gulp-match, but it's the general idea of what i've got.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions