Answer the question
In order to leave comments, you need to log in
How to combine multiple gulp tasks into one?
Here are my tasks:
// TTF to EOT, OTF, WOFF, SVG + font-face.css
gulp.task('fontmin', function() {
return gulp.src('app/fonts/*.ttf')
.pipe(fontmin())
.pipe(gulp.dest('app/fonts'))
});
// all font-face.css files to app/fonts.css
gulp.task('fface',['fontmin'], function(){
return gulp.src('app/fonts/*.css')
.pipe(concat('fonts.css'))
.pipe(gulp.dest('app/css'))
});
// Removes font-face.css from app/fonts
gulp.task('fonts', ['fface'], function(){
return del.sync('app/fonts/*.css')
});
gulp.task('fonts', function() {
var fontminify = gulp.src('app/fonts/*.ttf')
.pipe(fontmin())
.pipe(gulp.dest('app/fonts'));
var fface = gulp.src('app/fonts/*.css')
.pipe(concat('fonts.css'))
.pipe(gulp.dest('app/css'));
var remove = del.sync('app/fonts/*.css');
return merge(fontminify, fface, remove);
});
Answer the question
In order to leave comments, you need to log in
Here is a simple option -
gulp.task("название общего таска", ["тут", "твои", "таски"]);
gulp.task( 'fontWork', gulp.series('fonts', 'fface', 'fontmin') );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question