I'll start by saying I've looked for hours and haven't found any solution that works for me. I'm trying to get away from Compass and switch to Sass for my company's website, and I'm running into the issue that Sass doesn't recognize my directories; I get the "file was not found or unreadable" error.
I've tried to compile using vanilla Sass, gulp-sass, and gulp-ruby-sass, and I get the exact same error on all of them. Here's my folder structure:
- css
- sass
- variables
- _colors.scss
- _type.scss (... etc.)
- abstractions
- base
- components
- gulpfile.js
My styles.scss file looks like this (there's a bunch of comments at the top):
@import "variables/**/*";
@import "abstractions/**/*";
@import "base/**/*";
@import "components/**/*";
And my gulpfile.js looks like this:
var gulp = require('gulp'),
sass = require('gulp-sass');
gulp.task('sass', function() {
gulp.src('sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css/'));
});
gulp.task('default', ['sass'], function() {
gulp.watch("sass/**/*.scss", ['sass']);
});
The exact error I get is:
error sass/lgfcu.styles.scss (Line 23: File to import not found or unreadable: variables/**/*.)
I've tried using "includePaths" with gulp-sass and no luck there. I've also tried playing with the paths: ./variables/**/*
, variables/**/*.scss
, etc.
If I include the full path to a specific file, it does work, but the globbing is not working. Any help would be greatly appreciated!