Public Tasks in Gulp

Let's say we have several tasks:

javascriptfunction taskD(cb) {
  console.log('taskD');
  cb();
}

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

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

You can create as many tasks as you want, however, only one task can be the main one - the one we export by default:

javascriptexports.default = taskD;

As you already know, such a task can be run via the command line using the following command:

terminalgulp

Other tasks can also be exported:

javascriptexports.task1 = task1;
exports.task2 = task2;

Exported tasks are called public, as they are created for their subsequent execution via the command line.

In our case, to run the first task in the command line, you need to do the following:

terminalgulp task1

And to run the second task - the following:

terminalgulp task2
Задание 1

Create a task that outputs the current day to the console.

Задание 2

Create a task that outputs the current month to the console.

Задание 3

Create a task that outputs the current year to the console.

Задание 4

Run the created tasks one by one via the command line.