Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kristinita opened this issue Feb 24, 2018 · 0 comments
Open

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

Kristinita opened this issue Feb 24, 2018 · 0 comments

Comments

@Kristinita
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant