Skip to content

feature request: Source Maps #6

wmhilton opened this Issue Dec 16, 2013 · 4 comments

3 participants


How hard would it be to support source maps for CoffeeScript files? I tried simply adding sourceMap: on to the compileOptions, but that didn't work. I'm a little worried that it will be difficult to add, since it would require writing out multiple files (the JavaScript, the original CoffeeScript, and a Map). But it would make my life much easier trying to debug!

DocPad member

Looks like we'd need another compilation process to render the source map, and output the additional .map file:

Would be interesting to add some of this to the UglifyJS plugin as well:


Code attached, although it uses data-urls to avoid a second compilation pass, so there's room for some improvement; perhaps an option to output separate .map files, but we'd need a clear way to be able to produce multiple output files from one input document - including the original coffeescript source, otherwise there's not much point to sourcemaps!

dominics commented Apr 4, 2014

I've just merged the sourcemaps support and published master as v2.4.0. Give it a try! 👍

@dominics dominics closed this Apr 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.