title: Skip binary files in a gulp task
body: <p>I'm trying to use <a href="https://www.npmjs.com/package/gulp-if" rel="nofollow noreferrer">gulp-if</a> and <a href="https://www.npmjs.com/package/gulp-is-binary" rel="nofollow noreferrer">gulp-is-binary</a> in order to skip over binary files in a my HTML task, but I'm having a lot of trouble.</p>
  
  <p>I've got this task:</p>
  
  <pre><code>// html task, converts includes &amp; variables in HTML
  gulp.task("html", function () {
      "use strict";
  
      // development HTML directory
      var htmlDirectory = dev;
  
      // production HTML directory (if --dist is passed)
      if (argv.dist) htmlDirectory = dist;
  
      // clean directory if --dist is passed
      if (argv.dist) del([htmlDirectory + "/**/*", "!" + htmlDirectory + "{/assets,/assets/**}"]);
  
      // process HTML
      return gulp.src([src + "/**/*", "!" + src + "{/assets,/assets/**}"])
          // prevent breaking on error
          .pipe(plumber({errorHandler: onError}))
          // check if source is newer than destination
          .pipe(gulpif(!argv.dist, newer({dest: htmlDirectory, extra: [src + "{/partials,/partials/**}"]})))
          // check if a file is a binary
          .pipe(gulpif(isBinary(), function () { /* somehow skip? */ } ))
          // replace variables
          .pipe(fileinclude({
              prefix: "@@",
              basepath: "@file",
              context: {
                  name: name,
                  description: description,
                  version: version,
                  repository: repository,
                  license: license,
              }
          }))
          // replace FontAwesome placeholders
          .pipe(replace(/(?:&lt;icon:)([A-Za-z0-9\-\_]+)[^&gt;]*(?:&gt;)/g, "&lt;i class='fa fa-$1' aria-hidden='true'&gt;&lt;\/i&gt;"))
          // output to the compiled directory
          .pipe(gulp.dest(htmlDirectory))
          // reload the files
          .pipe(browserSync.reload({stream: true}))
          // notify that the task is complete, if not part of default or watch
          .pipe(gulpif(gulp.seq.indexOf("html") &gt; gulp.seq.indexOf("default"), notify({title: "Success!", message: "HTML task complete!", onLast: true})))
          // push the task to the ranTasks array
          .on("data", function() {
              if (ranTasks.indexOf("html") &lt; 0) ranTasks.push("html");
          });
  });
  </code></pre>
  
  <p>This is the line I'm having trouble with:</p>
  
  <pre><code>.pipe(gulpif(isBinary(), function () { /* somehow skip? */ } ))
  </code></pre>
  
  <p>I can't figure out how to tell Gulp to skip that file and continue the rest of the task. I feel like I'm missing something simple.</p>