⊗tlGpBsPrp 9 of 14 menu

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:

npm install gulp-less --save-dev

After that, we import the installed plugin:

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

We use our plugin for a group of files:

function task(cb) { return src('src/*.less') .pipe(less()) .pipe(dest('dist')); }

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

bydeenesfrptru