Answer the question
In order to leave comments, you need to log in
Why is gulp.series and gulp.parallel not a function?
Setting up gulp here are my settings.
const gulp = require('gulp');
const concatCSS = require('gulp-concat-css');
const debug = require('gulp-debug');
const sourcemaps = require('gulp-sourcemaps');
const gulpIf = require('gulp-if');
const del = require('del');
const series = require('gulp-series');
const isDevelopment = !process.env.NODE_ENV || process.env.NODE_ENV == 'development';
gulp.task('css', function () {
return gulp.src('frontend/**/*.css')
.pipe(concatCSS('all.css'))
.pipe(gulpIf(isDevelopment, sourcemaps.init()))
.pipe(gulpIf(isDevelopment, sourcemaps.write()))
.pipe(gulp.dest('public'));
});
gulp.task('clean', function() {
return del('public');
});
gulp.task('assets', function() {
return gulp.src('frontend/assets/**')
.pipe(gulp.dest('public'));
});
gulp.task('build', gulp.series(
'clean',
gulp.parallel('css', 'assets'))
);
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