-
Notifications
You must be signed in to change notification settings - Fork 84
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
Feature: CoffeeScript Source Map Support #39
Comments
Not as straightforward as I first thought. Below is a very rough, proof-of-concept. Manages to show CoffeeScript source in browser - but is unusably slow, incorrect line number mapping due to PostProcessors, and very badly integrated. CoffeeScriptRedux has a ton of bugs too.
|
Just found the branch being worked on for Sprockets: sstephenson/sprockets#311. Seems to be aimed at source maps for the concatenated Javascript use case, not the Javascript to CoffeeScript use case. Using the Also, using a query string like |
Anyway, we should wait until UglifyJS v2 released https://github.com/mishoo/UglifyJS2 |
I believe it is already released https://github.com/mishoo/UglifyJS2/tags |
+1 |
If you have a file `foo.coffee` or `foo.js.coffee`, when you load `foo.js`, the `X-SourceMap` header is added to the response with value `foo.js.map`. Inside this source map is a reference to `foo.coffee`. When the browser makes a request to `foo.coffee` it will return the uncompiled CoffeeScript source. This allows debugging CoffeeScript source in a browser and also works with IntelliJ Remote Javascript debugger too. Includes tests. See Issue js-kyle#39.
This ticket is closed as not enougth generic, in flavour of #116 . |
http://ryanflorence.com/2012/coffeescript-source-maps/
Only a few simple changes needed:
PostProcessor
forapplication/javascript
.map
files compiled with CoffeeScriptRedux. I'm digging into this now to see how it integrates with Mincer.Generating source maps involves the following code:
Should be as easy as using an engine to handle the
.map
extension.The text was updated successfully, but these errors were encountered: