Skip to content

question(hooks): gulp task run, if Imagemin run #14

@Kristinita

Description

@Kristinita

1. Summary

If I run imagemin task, gulp task run for me as well.

It no bad, but:

  1. It no documented behavior,
  2. I don't understand details, how it works.

2. Configuration

See example configuration in branch SashaGruntGulp of my SashaGruntDebugging repository. I add to this branch:

  • Gruntfile.coffee,
  • package.json,
  • SashaGruntGulpExample.html — example HTML file.

3. Steps to reproduce

I run in console:

grunt imagemin --verbose

4. Behavior with gulp task

If my configuration as in [**Gruntfile.coffee**](https://github.com/Kristinita/SashaGruntDebugging/blob/SashaGruntGulp/Gruntfile.coffee), file SashaGruntGulpExample.html modify to:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GruntGulp + Imagemin example</title>
</head>
<body>
<!-- Trimming empty span -->
 Sasha text.
</body>
</html>

Trimming empty span was deleted.

5. Behavior without gulp task

If I comment or remove these lines in my Gruntfile.coffee file:

gulp:
    gulptidy:
        gulp.src('output/SashaGruntGulp/SashaGruntGulpExample.html', base: ".")
        .pipe(htmltidy(
            wrap: 0)).pipe gulp.dest('.')

SashaGruntGulpExample.html not modify.

Proceeding from these data, I concluded, that gulp task run, when I run imagemin task.

Thanks.

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