Skip to content

Running task steps per folder fails if containing folder is empty. #2122

Closed
@dave-cross

Description

@dave-cross

I set up a similar task to the one described here: https://github.com/gulpjs/gulp/blob/master/docs/recipes/running-task-steps-per-folder.md

Instead of running JS or SCSS, it runs a sprite generator.

The issue is that if there're no folders returned from getFolders(), the task (and any sequenced/parallel tasks), fail. Without subfolders in the src path, .map won't run... which means gulp scripts don't fire... leaving us with a null stream.

Is there any way to return an "empty" stream if no folders are present or inform gulp that the task has run successfully in the same instance?

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