javascript

SCSS to CSS Gulp

//Installation - npm install node-sass gulp-sass --save-dev

var gulp = require('gulp');
var sass = require('gulp-sass');

gulp.task('sass_', function() {
    return gulp.src('app/scss/*.scss')
        .pipe(sass({outputStyle: 'compressed'}))
        .pipe(gulp.dest('app/content/css'));
});

To convert .scss files to CSS files using gulp you can use gulp-sass npm package. It will process your files into valid CSS files recognized by the browser. You can also minify these files along with conversion by passing outputStyle: 'compressed'.

NPM package installation

npm install node-sass gulp-sass --save-dev
Was this helpful?