morris / vinyl-ftp

Blazing fast vinyl adapter for FTP
Other
388 stars 31 forks source link

Why doesn't differentSize work? #98

Open SilencerWeb opened 7 years ago

SilencerWeb commented 7 years ago

It just upload even if size is the same


var gulp = require("gulp"),
    plugins = require("gulp-load-plugins")(),
    ftp = require("vinyl-ftp");

gulp.task("deploy", function () {
  var conn = ftp.create({
    host: "",
    user: "",
    password: "",
    parallel: 10,
    log: plugins.util.log
  });

  var globs = [
    "dist/**"
  ];

  conn.rmdir("simple-boilerplate-testing/css", function() {});
  conn.rmdir("simple-boilerplate-testing/js", function() {});

  return gulp.src(globs, {buffer: false})

      .pipe(conn.differentSize("simple-boilerplate-testing/fonts"))
      .pipe(conn.differentSize("simple-boilerplate-testing/images"))
      .pipe(conn.differentSize("simple-boilerplate-testing/videos"))

      .pipe(conn.dest("/simple-boilerplate-testing"));
});