How to use the noop function from gulp-util

Find comprehensive JavaScript gulp-util.noop code examples handpicked from public code repositorys.

102
103
104
105
106
107
108
109
110
// gulp should be called like this :
// $ gulp --type production
gulp.task('scripts', function() {
  gulp.src('src/**/*.js')
    .pipe(concat('script.js'))
    .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
    .pipe(gulp.dest('dist/'));
});
```
fork icon104
star icon0
watch icon2

342
343
344
345
346
347
348
349
350
351
          .pipe(appendPrepend.prependFile(LUNR_INIT_PARTIAL))
          .pipe(appendPrepend.prependFile(ELASTICLUNR_LIBRARY))
          .pipe(gulp.dest(SITE_BASE + 'search'));
      }, function () {
        console.log('ERROR: couldn’t load the poem manifest!');
        return gulpUtil.noop();
      })
  ]);
});

fork icon4
star icon7
watch icon5

+ 24 other calls in file

116
117
118
119
120
121
122
123
124
125
126
127


gulp.task('lint:scripts', () => {
  return gulp.src(allScriptFiles)
    .pipe(eslint())
    .pipe(eslint.format())
    .pipe(continueOnError ? gutil.noop() : eslint.failAfterError())
})


gulp.task('lint:styles', () => {
  return gulp.src(srcStyleFiles)
fork icon0
star icon0
watch icon1