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

Source maps support #1

Closed
judofyr opened this issue Aug 4, 2015 · 6 comments
Closed

Source maps support #1

judofyr opened this issue Aug 4, 2015 · 6 comments
Assignees

Comments

@judofyr
Copy link
Collaborator

judofyr commented Aug 4, 2015

Any plans on supporting source maps?

@somebee
Copy link
Member

somebee commented Aug 4, 2015

The lexer already marks all tokens with their original location (both char and line/col), as it is used for analysis / annotations and the highlighter. I have limited knowledge of source maps, but from what I understand it should be relatively easy to support.

@marvinroger
Copy link

This feature is definitely needed for any serious project. Debugging unfortunately happens so often!

@judofyr
Copy link
Collaborator Author

judofyr commented Aug 22, 2015

It's not that bad actually. The JavaScript it generates is rather clean and
easy to debug. But yes, it's definitely a feature we want to implement.

On lør. 22. aug. 2015 at 12.04 Marvin Roger notifications@github.com
wrote:

This feature is definitely needed for any serious project. Debugging
unfortunately happens so often!


Reply to this email directly or view it on GitHub
#1 (comment).

@marvinroger
Copy link

That's right, the generated JS is clean, but when your debugger tells you that there is an error at x line, you lost some time to find the corresponding imba line. :)
Anyway, no hurry!

@somebee
Copy link
Member

somebee commented Aug 24, 2015

@marvinroger Preliminary support for sourcemaps has been added and released with v0.12.0. The sourcemap is embedded directly in the compiled files if you include --source-map-inline in imba watch/compile. Make sure the imba-file is accessible from the browser (correctly relative to the compiled file). I've tested it in Chrome and it seems to work well. Still a few mappings missing, but it should be pretty usable :)

@marvinroger
Copy link

Great! Thanks, you guys are very fast. :)

@somebee somebee self-assigned this Aug 24, 2015
@somebee somebee closed this as completed Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants