text: 'use strict';
  
  const cfg                 = require('../settings');
  const { task, src, dest } = require('gulp');
  const zip                 = require('gulp-zip');
  
  const leadingZero = function (number) {
    return number < 10 ? `0${number}` : number;
  };
  
  const getDateTime = function () {
    const now = new Date();
    const year = now.getFullYear();
    const month = leadingZero(now.getMonth() + 1);
    const day = leadingZero(now.getDate());
    const hours = leadingZero(now.getHours());
    const minutes = leadingZero(now.getMinutes());
    const seconds = leadingZero(now.getSeconds());
  
    return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
  };
  
  task('zip', function () {
    let dateTime = getDateTime();
    let fileName = `dist-${dateTime}.zip`;
  
    return src(`${cfg.paths.dest.root}**/*.*`)
      .pipe(zip(fileName))
      .pipe(dest(cfg.paths.dist));
  });
  