-
Notifications
You must be signed in to change notification settings - Fork 382
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
Not passing the right paths to gulp-sourcemaps for multi-level @imports #92
Comments
+1 Having the same issue |
Never mind, my issue is different and only occurs when I use sourcemaps in conjunction with autoprefixer |
Wonder if this is related to sass/node-sass#425 |
Here's a reduced test case: package.json {
"name": "gulp-sass-test",
"version": "1.0.0",
"dependencies": {
"gulp": "^3.8.8",
"gulp-sass": "^1.0.0",
"gulp-sourcemaps": "^1.2.2"
}
} gulpfile.js var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('style', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css'));
});
gulp.task('styleSpecific', function () {
return gulp.src(['./scss/primary.scss', './scss/secondary/secondary.scss'])
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css'));
}); scss/primary.scss @import "tertiary/tertiary"; scss/secondary/secondary.scss @import "../primary"; scss/tertiary/tertiary.scss body {
background: pink;
} Run
Run Really hoping somebody more knowledgeable than me can track down what's going wrong here. |
Having the same issue, hope that PR 97 will fix this. :) |
I am not sure if this is an issue with gulp-sass or gulp-sourcemaps, so please let me know if you think I have to file this issue with gulp-sourcemaps instead.
I have directory something structure like this, all within
src/main/style/
:And
main.scss
imports global things and compiles tomain.css
.foo-theme_main.scss
imports its own settings file, thenmain.scss
and everything that entails, then its own overrides, and compiles tofoo-theme_main.css
.I compile these with a gulp task something like this:
And then I run into an error like this:
(I'm on Windows, hence the
\
)Notice that the path of the file that was not found should start with
\src\main\style\
but for some reason the\main\style\
part of the path is getting lost in the processing and the file is not being found.If I change my
gulp.src
to be just./src/style/themes/foo-theme/foo-theme_main.scss
then the task works fine. So it seems that the problem has to do with the globbing?Am I doing it wrong, or is this a bug?
(I'm on Windows, running gulp-sass v1.0.0 and gulp-sourcemaps v1.2.2.)
The text was updated successfully, but these errors were encountered: