-
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
gulp-sass discards changes from earlier in the pipeline when generating source maps #158
Comments
@dlmanning @Keats So I've tracked down this problem. We're passing the file name to @jmm, your |
That example is just to illustrate one of the failure modes. But, doing the rename after isn't equivalent, because then the original name winds up in the |
@jmm Understood, see the rest of my comment about the underlying issue. |
@Snugug Yup, I read it all, but even the rename case isn't fully solved until the underlying issue is corrected. |
Right, I'm looking into a solution now. |
Great, thanks! |
Resolves dlmanning#158 once I get it working
@jmm Give this a test:
I think I've fixed this to work as you're expecting. The two examples you've provided should now work. |
Thanks @Snugug. I tried it and it does indeed work as it should now for the the test cases I posted. |
Resolves dlmanning/gulp-sass#158 once I get it working
I believe there's a serious flaw in this plugin with the logic around
file.sourceMap
andopts.sourceComments
. It results in node-sass attemping to re-read the file from disk, which discards changes from earlier in the gulp pipeline, and if an earlier change is a rename (e.g. with gulp-rename) it results in node-sass attemping to read a file which either doesn't exist or is the wrong file. Here are a couple of simple examples:Given:
Gulp 3.8.10, gulp-sass 1.2.4, Ubuntu 12.
This (rename):
Results in:
And here is an example with a simple plugin that changes file contents (prepends a comment):
This results in the changes from the prefix plugin being discarded.
This means that the changes proposed in Consistent file handling #66 should not be accepted -- things need to go the other way.
If we're on the same page about this, I may work on a pull request.
The text was updated successfully, but these errors were encountered: