P
P
Pavel2016-01-05 19:50:21
gulp.js
Pavel, 2016-01-05 19:50:21

How to select several file types at once in gulp (how to compress php and html)?

I don’t know how to ask a question in Google, I need to compress the html that is in files with the php extension with one html-min task

gulp.task('html', function() {
    return gulp.src('*.html')
        .pipe(htmlmin({collapseWhitespace: true}))
        .pipe(gulp.dest('dist'))
});

apparently you need to add something here return gulp.src('*.html')
tried return gulp.src('*.php' && '*html') but it doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TekVanDo, 2016-01-05
@mrusklon

gulp.src('*.+(html|php)')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question