M
M
Maxim2017-01-15 15:18:11
Node.js
Maxim, 2017-01-15 15:18:11

Gulp. Why doesn't it take css and js files when executing a task?

gulp.task('useref', function(){
return gulp.src('app/*.html')
.pipe(useref())
.pipe(gulpIf('*.js', uglify()))
.pipe (gulpIf('*.css', cssnano()))
.pipe(gulp.dest('dist'))
});
When executing, the task takes only html files ... how to make it take all the rest?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Perov, 2017-01-15
@SnaIP

return gulp.src('app/*.html') you have a template and says to take only html files
and in general you have to return at the beginning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question