gulp-if

Conditionally run a task.

Installation

npm install --save-dev gulp-if

Configuration

const gulp = require('gulp');
const useref = require('gulp-useref');

gulp.task('default', function () {
  return gulp.src('app/*.html')
    .pipe(useref())
    .pipe(gulp.dest('dist'));
});