⊗tlGpBsOP 10 of 14 menu

Operation Flow in Gulp

Let's now learn how to perform multiple operations on files. For example, first convert LESS to CSS, and then minify the resulting CSS.

To start, let's import everything we need:

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

Now let's perform the described operations:

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

Convert Stylus files to CSS using the gulp-stylus plugin, then add prefixes to properties using the gulp-autoprefixer plugin and then perform minification of the resulting CSS using the gulp-csso plugin.

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