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

Use CoffeeScriptRedux for source mapped compilation #20

Open
divideby0 opened this issue Sep 8, 2012 · 2 comments
Open

Use CoffeeScriptRedux for source mapped compilation #20

divideby0 opened this issue Sep 8, 2012 · 2 comments

Comments

@divideby0
Copy link

There is a new coffeescript compiler, CoffeeScriptRedux, released today which supports source maps. These effectively eliminate the debugging challenges associated coffeescript by providing linkage between the compiled JavaScript and the original coffeescript file. Chrome Canary builds already support this feature, which means you can debug directly in your browser.

I've started playing around with this using CoffeeScriptRedux on the command line and its a beautiful, beautiful thing. But I'd love it even more if I could use it directly with Grails.

Unfortunately, there's no single js file for compilation in the github project. The project itself uses node.js, so I'm unclear on what exactly would need to be done to compile from Rhino. Once that part is figured out, it should simply be a matter of generating two resources: the normal compiled javascript file and the source map. We'd then need to augment the compiled Javascript file with a comment pointing to the location of the source mapped resource.

@divideby0
Copy link
Author

I've created a Github issue on the CoffeeScriptReduce project soliciting advice on how to compile from Rhino:

michaelficarra/CoffeeScriptRedux#42

@divideby0
Copy link
Author

Please note that Coffeescript 1.6.0 now supports source maps natively:

http://coffeescript.org/#source-maps

So this would probably be safer than using redux.

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

No branches or pull requests

1 participant