compiles empty css files
Closed this issue · 0 comments
SteinTheRuler commented
when compiling scss files it returns empty files.
gulpfile.js:
'use strict';
var gulp = require('gulp');
var sassInheritance = require('gulp-better-sass-inheritance');
var sass = require('gulp-sass');
var cached = require('gulp-cached');
var gulpif = require('gulp-if');
var filter = require('gulp-filter');
const styleChanged = () => {
return gulp.src("./STYLE/**/*.scss")
.pipe(gulpif(global.isWatching, cached("sass")))
.pipe(sassInheritance({base: "./STYLE/"}))
.pipe(filter(function (file) {
return !/\/_/.test(file.path) || !/^_/.test(file.relative);
}))
.pipe(sass())
.pipe(gulp.dest("./_Build/STYLE"));
};
const doWatch = () => {
global.isWatching = true;
gulp.watch("./STYLE/**/*.scss", styleChanged);
};
exports.default = doWatch;
exports.styleChanged = styleChanged;