Please tell me not compiled sass in css. Installed gulp, sass, registered task. But when I write code in a sass file, a css file is created, but empty.
1 answer
Most likely you did not add ./ before app/sass/main.sass
share your gulpfile
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var plumber = require('gulp-plumber'); var browserSync = require('browser-sync'); var reload = browserSync.reload; gulp.task('sass', function () { gulp.src('./media/css/mainstyle.scss') .pipe(sass().on('error', sass.logError)) .pipe(plumber()) .pipe(reload({stream:true})) .pipe(gulp.dest('./media/css')); }); gulp.task('browserSync', function() { browserSync({ server: { baseDir: "./" }, port: 8080, open: true, notify: false }); }); gulp.task('html', function(){ gulp.src('./index.html') .pipe(reload({stream:true})); }); gulp.task('server', function () { gulp.watch('./media/css/mainstyle.scss', ['sass']); gulp.watch('./index.html', ['html']); }); gulp.task('default', ['server', 'browserSync']); - With a point a similar situation - Sergey Sochienko
- @ Sergey Sochienko and how do you run the compilation? - Swartex
|

