Hacker News new | past | comments | ask | show | jobs | submit login
CoffeeScript source maps (ryanflorence.com)
122 points by v33ra on Sept 8, 2012 | hide | past | favorite | 10 comments



I just want to note that the new CoffeeScript compiler is using ESCodeGen as a backend, which is doing the source map heavy lifting. Anyone writing a compiler which targets JS can use ESCodeGen as a backend and get source maps pretty much for free. Awesome news all around!

https://github.com/Constellation/escodegen

Note: I do not want it to seem like I want to take anything away from Michael Ficarra and the new CoffeeScript compiler. He also wrote the code to integrate source maps with ESCodeGen, but it is something that many projects will be able to take advantage of, not just CoffeeScript.

In other source map news, if anyone hasn't seen it yet, UglifyJS v2 now supports source maps: http://lisperator.net/blog/uglifyjs-v2-news/

Source map support is on the way for Firefox's debugger as well: https://bugzilla.mozilla.org/show_bug.cgi?id=771597


Suppose I could go make that more clear in the article.


This is possibly the most important thing to happen to my frontend development workflow all year. Amazing contribution. Thank you.


Is CoffeeScriptRedux actually ready for production use? From my read of https://github.com/michaelficarra/CoffeeScriptRedux/wiki/Pro... there are many features missing.


I would not recommend you use it in production just yet, but from my reading of that wiki page, there are only 3 or 4 fairly uncommon features that are unsupported. Most of them could still use more tests, though, and that's why they are missing that last checkmark.


I would LOVE to see source maps implemented into Rails CS compilation. Any idea how to do it/when will this be added to rails?


Will this affect debugging under node.js, or just browsers? (Googling doesn't seem to make this clear.)


I would assume both, if you use node-inspector to debug your programs you are using the browser's debugger.


Ah, I was just asking about stacktraces, if the line-numbers will then correspond to the CoffeeScript line-numbers.

It's no issue for me personally, but it helps smooth over resistance to CoffeeScript.


As the article mentions, the next big step will be access to the debug console.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: