Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Consider adding support for sourcesContent to the source map #363

Closed
simonexmachina opened this issue Jul 8, 2014 · 9 comments
Closed

Comments

@simonexmachina
Copy link
Contributor

The source map spec supports embedding the content of the source files into the source map. This provides a good solution for source maps that "just work", without requiring the user to ensure that the source files are available over HTTP or using user-agent specific features such as Chrome's Workspaces feature.

A suggestion would be to provide an option .includeSources to indicate that the sources should be included in the source map. I'd submit a PR but it's coming from the C code, so I'm not the man for the job.

@simonexmachina
Copy link
Contributor Author

I've looked into handling this ourselves, but the problem is that the entries in the sources property of the source map are file paths, rather than the relative paths that are specified in the @import statements. This would be another alternative that would allow consumers to add this information themselves.

@joliss
Copy link

joliss commented Jul 8, 2014

Hm, just to chime in here... I wonder if this issue is best raised on upstream libsass repo itself?

@andrew
Copy link
Contributor

andrew commented Jul 8, 2014

@joliss I think you're right, libsass does all the work, node-sass just wraps it in a javascript interface.

It looks like there's an open issue over here: sass/libsass#212

@simonexmachina
Copy link
Contributor Author

Oh yeah, good point @joliss! I'll do that...

@nickdima
Copy link

The feature seems to already be implemented in libsass sass/sass@dd48bb9. Am I missing something?

@simonexmachina
Copy link
Contributor Author

Yes, this is supported by libsass now. Has this option been exposed via node-sass yet?

@am11
Copy link
Contributor

am11 commented Nov 19, 2014

@aexmachina, ICYMI: #543. 😄

@simonexmachina
Copy link
Contributor Author

Great, thanks @am11. That looks really good, looking forward to a cleaner API!

@am11
Copy link
Contributor

am11 commented Dec 25, 2014

Hey @aexmachina, totally forgot about this one. The good news is: v2 is out with this feature. See changelog https://github.com/sass/node-sass/releases/tag/v2.0.0-beta and README.

@am11 am11 closed this as completed Dec 25, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants