T
T
Taron4uk2019-02-06 16:51:48
gulp.js
Taron4uk, 2019-02-06 16:51:48

Gulp does not compile SASS to CSS, what should I do?

const gulp          = require('gulp'),
      sass          = require('gulp-sass'),
      browsersync   = require("browser-sync").create();

function browserSync(done) {
  browsersync.init({
    server: {
      baseDir: "src"
    },
    port: 3000,
    notify: false
  });
  done();
}

function gulpSass() {
  return gulp
    .src('src/sass/**/*.sass')
    .pipe(sass({ outputStyle: "expanded" }))
    .pipe(gulp.dest('src/css'))
    .pipe(browsersync.stream())
}

gulp.task('sass', gulpSass);
gulp.task('browser-sync', browserSync);
gulp.task('default', gulp.parallel(browserSync, sass));

Everything, installed correctly, gulp by cmd is included. But with new styles in style.sass , nothing happens in the style.css file? What to do? Also, there is no auto-refresh of the page and the same "BrowserSync Connected"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question