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

Add support for sourcemaps (--debug-info in ruby). Fixess #33 #89

Merged
merged 1 commit into from
May 13, 2013

Conversation

dorny
Copy link

@dorny dorny commented Feb 13, 2013

Honestly, i didn't study sourcemap specifications.
I opened generated css with --debug-info from ruby and it look's like it's almost same as -l option. Only format is different.

@media -sass-debug-info{filename{font-family:<absolute_filepath>}line{font-family:\00003<line>}}
/* line <line>, <filename>*/

And... It works fine :)

@akhleung
Copy link

Thanks! I'll look it over merge it in this weekend.

@dahlia
Copy link
Member

dahlia commented Feb 20, 2013

Great job! 👍

@dahlia
Copy link
Member

dahlia commented Feb 20, 2013

It would be better if any parameter for it is exposed via C interface (sass_interface.h).

@dorny
Copy link
Author

dorny commented Mar 9, 2013

I'm not sure what exactly do you mean by "exposed viac C interface".
I have already done it by:

#define SASS_SOURCE_COMMENTS_NONE 0
#define SASS_SOURCE_COMMENTS_DEFAULT 1
#define SASS_SOURCE_COMMENTS_MAP 2

In similar way there are defined SASS_STYLE_NESTED,SASS_STYLE_EXPANDED,... as parameters for output style.

@dahlia
Copy link
Member

dahlia commented Mar 9, 2013

@dorny Oh I exactly meant such thing, cool.

@vaanwd
Copy link

vaanwd commented Mar 20, 2013

Failed to compile on Windows with MinGW.

g++ -Wall -O2 -fPIC -c -o node.o node.cpp
node.cpp:1: warning: -fPIC ignored for target (all code is position independent)
node.cpp: In member function 'std::string Sass::Node::debug_info_path() const':
node.cpp:90: error: 'realpath' was not declared in this scope
make[1]: *** [node.o] Error 1

akhleung pushed a commit that referenced this pull request May 13, 2013
Looks good! Sorry for the long delay. I'll probably make some changes later so that source maps and comments aren't mutually exclusive.
@akhleung akhleung merged commit 4d44a4d into sass:master May 13, 2013
@lmartins
Copy link

Sourcemaps is not the same as debug-info as explained here:
#122 (comment)

@lmartins
Copy link

While we don't have source-maps, wouldn't be possible to add the original file/line numbers baked in the output, like the original debug-info in Sass?

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.

5 participants