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

sourcesContent option for --sourcemap #1107

Closed
michaek opened this issue Feb 7, 2014 · 4 comments
Closed

sourcesContent option for --sourcemap #1107

michaek opened this issue Feb 7, 2014 · 4 comments
Labels
enhancement New feature or request planned We would like to add this feature at some point
Milestone

Comments

@michaek
Copy link

michaek commented Feb 7, 2014

We should have the option to include sourcesContent in generated sourcemaps, especially because the path to a source sass/scss file will often be inaccessible to dev tools.

A similar issue on libsass exists: sass/libsass#212

@nex3 nex3 added the Feature label Feb 7, 2014
@nex3
Copy link
Contributor

nex3 commented Feb 7, 2014

Does the sourcesContent property just literally contain the SCSS source?

@nex3
Copy link
Contributor

nex3 commented Feb 8, 2014

I'm considering what the UI for this should be. It would be nice to have a mode that includes sourcesContent for importers that don't support public URIs, a mode that always includes sourcesContent regardless of the importer, and a mode that never includes sourcesContent. One possibility would be to add a tri-mode flag for this... something like --sourcemap-inline={always/never/sometimes} (I'm not a huge fan of the name sourcemap-inline; other suggestions would be appreciated).

There have also been requests to support file: URIs for sourcemaps, so we could have something like --sourcemap={inline,file-uri,url}. That makes it difficult to choose the behavior outlined above, though.

@nex3 nex3 added this to the 3.3 + 1 milestone Feb 10, 2014
@nex3
Copy link
Contributor

nex3 commented Feb 10, 2014

I'd like to do something for this for 3.4, but it's not critical that we do so.

@michaek
Copy link
Author

michaek commented Feb 12, 2014

Sorry to not respond to this yet! UglifyJS uses the flag --source-map-include-sources, which seems as reasonable to me as anything else. https://github.com/mishoo/UglifyJS2#usage If it's something you see as valuable, I'll take a look and see if I can submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned We would like to add this feature at some point
2 participants