Gulp series
| 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
| 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 |