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

Make sourcemap source paths relative to file.base; fixes #92. #97

Merged
merged 2 commits into from
Oct 29, 2014
Merged

Make sourcemap source paths relative to file.base; fixes #92. #97

merged 2 commits into from
Oct 29, 2014

Conversation

davidtheclark
Copy link
Contributor

From gulp-sourcemaps:

Important: Make sure the paths in the generated source map (file and sources) are relative to file.base (e.g. use file.relative).

However, the generated source map from Libsass contains paths relative to the file itself, not file.base. So to mediate between the two libraries I think gulp-sass has to change the paths that come form Libsass, make them relative to file.base, so they are correct for gulp-sourcemaps.

All the existing tests still pass, and I added a new one for this particular situation.

This fix seems to take care of the problem I described in #92.

@@ -4,6 +4,7 @@ var gutil = require('gulp-util');
var fs = require('fs');
var path = require('path');
var test = require('tape');
var sourcemap = require('source-map');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this supposed to be? It's making the automated tests fail.

@davidtheclark
Copy link
Contributor Author

Sorry about that require statement I forgot to remove. It didn't break my tests because it was installed locally I guess.

@pspeter3
Copy link

Is there any word on this?

@dlmanning dlmanning merged commit 050724d into dlmanning:master Oct 29, 2014
@pspeter3
Copy link

Thanks!

@dlmanning
Copy link
Owner

And thank you, @davidtheclark. @pspeter3, could you confirm this fixes the problem?

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

Successfully merging this pull request may close these issues.

None yet

3 participants