use for check file if it's empty
$ npm install --save-dev gulp-file-empty
const gulp = require('gulp');
const isEmpty = require('gulp-file-empty');
gulp.task('default', () =>
gulp.src('src/app.js')
.pipe(isEmpty())
.pipe(gulp.dest('dist'))
);
MIT © x-yao