Gulp. Plugins. Compile SCSS to CSS

Home » Tutorials » Developers tools » Gulp. Plugins. Compile SCSS to CSS
We continue Gulp learning. Today we’ll consider Gulp plugins necessity, install one of it (for compile Sass to CSS).
You need to install plugins to complete different frontend tasks with Gulp. It is installed as simple npm packages.We’ll use gulp-sass plugin for compile sass to css

Code lesson

const {src, dest, series, watch} = require('gulp');
const sass = require('gulp-sass');
sass.compiler = require('node-sass');

function defaultTask(cb) {
    return src('./scss/**/*.scss')
        .pipe(sass().on('error', sass.logError))

exports.default = defaultTask


Submit a Comment

Your email address will not be published. Required fields are marked *

The reCAPTCHA verification period has expired. Please reload the page.

Pin It on Pinterest

Share This