CSS Preprocessors in Gulp

Let's now learn how to transform LESS into CSS. This is done using the gulp-less plugin.

First, this plugin must be installed into our project:

terminalnpm install gulp-less --save-dev

After that, we import the installed plugin:

javascriptlet {src, dest} = require('gulp');
let less = require('gulp-less');

We use our plugin for a group of files:

javascriptfunction task(cb) {
  return src('src/*.less')
    .pipe(less())
    .pipe(dest('dist'));
}
Задание 1

Using the gulp-sass plugin, transform SASS files into CSS.