Answer the question
In order to leave comments, you need to log in
Gulp series runs tasks in order??
Good day to all! There is this code for Gulp:
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var rename = require("gulp-rename");
var autoprefixer = require('gulp-autoprefixer');
gulp.task('sass', function (done) {
gulp.src("scss/style.scss")
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(rename({
suffix: '.min'
}))
.pipe(autoprefixer())
.pipe(gulp.dest("css/"))
done();
});
gulp.task('watch', function () {
gulp.watch('scss/*.scss', gulp.series('sass'));
});
gulp.task('copy', function (done) {
gulp.src(["**", "!scss/**", "!dist/**", "!node_modules/**", "!gulpfile.js", "!package.json", "!package-lock.json"])
.pipe(gulp.dest("dist/"));
done();
});
gulp.task("build", gulp.series(
"sass",
"copy"
));
gulp.task('default', gulp.series('build'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question