J
J
JastaFly2020-01-28 12:04:16
gulp.js
JastaFly, 2020-01-28 12:04:16

How to run one task inside another in Gulp 4?

Good day to all! There is a SASS task:

gulp.task('sass', function (done) {
    gulp.src("scss/style.scss")
        .pipe(sass({outputStyle: 'compressed'}))
    .pipe(rename({suffix: '.min'}))
        .pipe(gulp.dest("css/"))
    done();
});

how to call it inside another task in gulp 4???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ankhena, 2020-01-28
@Ankhena

gulp.task("build", gulp.series(
  "clean",
  "copy",
  "css",
  "uglifyjs",
  "html"
));

gulp.series lists the tasks to be performed when running the build task

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question