S
S
Sasha2017-10-15 20:59:05
gulp.js
Sasha, 2017-10-15 20:59:05

How to correctly collect tasks in a task in Gulpfile.js?

Good afternoon, please tell me how to properly assemble tasks in a task so that they work?
I have this code, there are no errors in the console, but for some reason only the first task
gulp.src(paths.styles.dest
works. The rest have the impression that they do not work.
I tried to declare the same one by one, and not as described - all together.

gulp.task('finish', function(){
  gulp.src(paths.styles.dest + 'all.css')
    .pipe(minifyCSS())
    .pipe(rename('all.min.css'))
    .pipe(gulp.dest(paths.styles.dest));
  gulp.src(paths.images.src)
    .pipe(imagemin())
    .pipe(gulp.dest(paths.images.dest));
  gulp.src(paths.scripts.src + 'main.js')
    .pipe(minifyjs())
    .pipe(rename('main.min.js'))
    .pipe(gulp.dest(paths.scripts.dest));
});

And another question, how to correctly specify several tasks in such a record?
gulp.task('icons-run', function(){
  gulp.task('icons-min');
  gulp.task('icons');
});

Thank you!

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