I’m not getting my final file expanded with Gulp-Sass

Asked

Viewed 39 times

0

hello, I’m unable to leave my final . css file expanded, I’ve tried to put
in outputStyle the word Expanded but the file remains compressed there goes the code where is all the Sass code.

//Adiciona os modulos instalados

const gulp = require('gulp');
const sass = require('gulp-sass');
const autoprefixer = require('gulp-autoprefixer');
const browserSync = require('browser-sync').create();

//Função para compilar o SASS e adicionar os prefixos

function compilaSass(){
  return gulp.src('css/scss/*.scss').pipe(sass(
    {outputStyle: 'expanded'}
    )).pipe(autoprefixer({
    browsers: ['last 2 versions'],
    cascade: false
    })).pipe(gulp.dest('css/')).pipe(browserSync.stream());

}

//Tarefa de gulp para a função de SASS

gulp.task('sass',compilaSass);

//Função para iniciar o servidor do browser

function browser(){
  browserSync.init({
    server: {
      baseDir: './'
    }
  })
}

//tarefa do browser-sync

gulp.task('browser',browser);

//Função de watch do GULP 

function watch(){
  gulp.watch('css/scss/*.scss',compilaSass);
  gulp.watch(['*.html','*.js']).on('change',browserSync.reload);

}

//inicia a tarefa de watch 

gulp.task('watch',watch);

//Tarefa padrão do GULP,que inicia o watch e o browser-sync

gulp.task('default',gulp.parallel('watch','browser'));
//Para finalizar a tarefa use o crt + C
  • You don’t have any other extensions like Beautifier or Pretyfy that already minifies CSS when it’s saved?

  • not only those there

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.