Reputation: 9373
Now that CoffeeScript supports the new Source Map hotness, I was wondering if I can also use the source maps not just in my browser, but on the command line while developing my nodeJS apps.
I want the JS compiler to give me more useful error traces where the lines actually match with my coffeescript files instead of compiled JS files.
Upvotes: 14
Views: 3444
Reputation: 1727
Until coffee-script gets some better support for require(), try this: https://npmjs.org/package/coffee-script-mapped
Upvotes: 3
Reputation: 18944
Now with CoffeeScript 1.6.2 it just "works" if you run your app with the coffee
command :)
Upvotes: 5
Reputation: 1041
The source-map-support module does this, just install the module and put this at the top of your code:
require('source-map-support').install()
Upvotes: 18