Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiles empty files #24

Open
SteinTheRuler opened this issue Jul 19, 2019 · 0 comments
Open

compiles empty files #24

SteinTheRuler opened this issue Jul 19, 2019 · 0 comments

Comments

@SteinTheRuler
Copy link

SteinTheRuler commented Jul 19, 2019

I followed the example, but after compiling all the files are empty, except one (for some reason).

Folders:
./STYLE
-ColorProfile.scss
-Functions.scss
-FunctionsUtility.scss
-MapsAndList.scss
-Media.scss
-Mixin.scss
./STYLE/Layout
-Flex.scss
-Mixin.scss

Files.zip

All files are connected.

gulpfile.js:

'use strict';
var gulp = require('gulp');
var sassInheritance = require('gulp-sass-inheritance');
var sass = require('gulp-sass');
var cached = require('gulp-cached');
var gulpif = require('gulp-if');
var filter = require('gulp-filter');

function styleChanged () {
  return gulp.src("./STYLE/**/*.scss")
    .pipe(gulpif(global.isWatching, cached("sass")))
    .pipe(sassInheritance({dir: "./STYLE/"}))
    .pipe(filter(function (file) {
      return !/\/_/.test(file.path) || !/^_/.test(file.relative);
    }))
    .pipe(sass())
    .pipe(gulp.dest("./_Build/STYLE"));
};

function doWatch () {
	global.isWatching = true;
	gulp.watch("./STYLE/**/*.scss", styleChanged);
};

exports.default = doWatch;
exports.styleChanged = styleChanged;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant