How To Pass Options With Gulp

You can pass options to your gulp task via the { key0: value, key1: value, key2: value, ... } syntax.

Example for gulp-purifycss

The task gulp-purifycss uses purifycss.

.pipe(purify(['./public/app/**/*.js', './public/**/*.html']))

becomes

.pipe(purify(['./public/app/**/*.js', './public/**/*.html'], { minify: true, info: true, rejected: false }))

Example for gulp-rsync

The task gulp-rsync uses rsync.

gulp.task('deploy', function() {
  return gulp.src('build')
    .pipe(rsync({
      root: 'build/',
      hostname: 'phoenix.crstin.com',
      destination: '/var/www/crstin.com/',
      username: 'dontdoitlikeonan',
      archive: true,
      clean: true,
      silent: false,
      compress: true,
      // dryrun: true,
      // verbose: true,
      command: true,
      recursive: true,
      times: true,
      emptyDirectories: true,
      progress: true,
      incremental: true
    }));
});