T
T
Torento203452021-03-26 20:16:51
gulp.js
Torento20345, 2021-03-26 20:16:51

How to merge 2 tasks into one?

Can you tell me how to combine 2 tasks into one?
I saw examples with arrays, but only files were indicated in the array

return gulp.src(['src/js/**/*', 'src/css/**/*']).pipe(gulp.dest('dist'));

But in my case, there are also file names and different folders.
gulp.task('css', function() {
  return gulp.src('css/*.css')
    .pipe(concat('all.css'))
    .pipe(gulp.dest('css'));
});
gulp.task('usercss', function() {
  return gulp.src('usercss/*.css')
    .pipe(concat('all.css'))
    .pipe(gulp.dest('usercss'));
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question