Gulp series

Contents
Introduction
Example
Related Articles

Introduction

series and parallel are a replacement for gulp.start in Gulp 4.0

In the next chapter you can find an example of it's usage

Example

Consider two functions that are using console.log and make a consequent export.

const gulp = require('gulp'),     {series} = require('gulp'); function test1(cb) {     console.log('test1');     cb(); } function test2(cb) {     console.log('test2');      cb(); } exports.test1 = test1; exports.test2 = test2; exports.test3 = series(test1, test2);

$ gulp test3

[20:46:36] Using gulpfile ~\Desktop\Sites\heihei\gulpfile.js
[20:46:36] Starting 'test3'...
[20:46:36] Starting 'test1'...
test1
[20:46:36] Finished 'test1' after 710 μs
[20:46:36] Starting 'test2'...
test2
[20:46:36] Finished 'test2' after 222 μs
[20:46:36] Finished 'test3' after 3.5 ms

test1 is started first and then test2

Article author: Andrei Olegovich

Related articles
Gulp
Concat multiple css to one
Send files via ftp with Gulp
Gulp series
Process only changed files with gulp.watch().on('change')
Copy Directory Gulp
Video Tutorials
JavaScript
NodeJS
NPM
Web

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: