-
Notifications
You must be signed in to change notification settings - Fork 381
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
Adds compatibility for gulp-sourcemaps #51
Adds compatibility for gulp-sourcemaps #51
Conversation
gulp-sourcemap
The one nasty thing about this change is that I've opened up issues for adding an option to not automatically append this comment at sass/libsass#357 and sass/node-sass#305. |
Hi folks, thanks for the PR, I will evaluate and try to get this merged in soon. Seems like source maps are the root of a lot of reported issues. |
Line 68 in README.md: |
+1 for this! Just wondering when this is going to come in? I'm wanting to use this in combination with gulp-autoprefixer and they are just getting their gulp-sourcemaps in place. |
That would be a nice addition, +1 for this ! |
+1 for this! |
We pipe it to |
+1 |
3 similar comments
+1 |
👍 |
👍 |
looks like some minor API changes preventing this PR from working as is:
|
This is also on me — was planning on getting to it later today (sticky on my computer). I'll take a look right now. |
Will look at this again when @jessepollak is happy with his PR |
@booleanbetrayal I'm not sure what you mean with your first fix, but I switched to |
Would be great to have a few people run it through though, I just came back to the code for the first time in a few months. |
An issue from my perspective is that right now many people are using gulp-sass's inlined source maps, I'll break their builds if I just pull that feature out. Probably I should merge this feature and take gulp-sass 1.0. |
I've merged in @jessepollak's PR, along with a couple of touch-ups on https://github.com/dlmanning/gulp-sass/tree/dev. It appears to work correctly with gulp-sourcemaps to me. Would anyone else mind double checking? If everything seems good I'll update the docs and release as 1.0 tomorrow. |
👏 thanks @dlmanning! |
@dlmanning Error handling ( |
I have the following configuration, using the gulp.task('sass', function () {
gulp.src('test/test.scss')
.pipe(sourcemaps.init())
.pipe(sass({
errLogToConsole: false,
onError: function(err) {
browserSync.notify(err, 2000);
console.log(err); }
}))
.pipe(autoprefixer({
browsers: ['last 3 versions'],
cascade: false
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('test'))
.pipe(filter('*.css')) // necessary?
.pipe(browserSync.reload({stream:true}));
}); |
@lunelson I put |
Hmm. I'm using the new gulp-autoprefixer which is now maintained by @sindresorhus. The section on sourcemaps seems to indicate that autoprefixer should come after; but it's unclear to me whether it's supposed to be parsing inline or external maps in that example... |
This seems to work if you want both within
|
Thanks, I'll give that a try when i get back to it |
1.0 |
This PR brings in the new source mapping system that's being spec'd in gulpjs/gulp#356 and floridoo/gulp-sourcemaps.
Note: until gulp-sourcemaps/gulp-sourcemaps#4 is merged, the
sourceMappingURL
in the output CSS files will be incorrectly formatted.