⊗tlGpBsPrT 4 of 14 menu

Private Tasks in Gulp

Let's say we have two tasks:

function task1(cb) { console.log('task1'); cb(); } function task2(cb) { console.log('task2'); cb(); }

Let's also say we have another task that calls other tasks inside itself:

function taskD(cb) { task1(cb); task2(cb); cb(); }

It is this task that we will export:

exports.default = taskD;

It turns out that we have one task for export - public, and two auxiliary tasks - private, which are used only inside the functions of public tasks.

Create three private tasks. Call their functions inside one public task.

Create two public and four private tasks. Call the first pair of private tasks in one public function, and the second pair - inside another.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline