I have some code written in CoffeeScript and I want to optimize the generated JavaScript with the Google Closure Compiler, so these files need to be documented with JSDoc.
My question is, how can I document the *.coffee files to generate javascript containing working JSDoc for the closure compiler?
One more question: is there a way to keep a single-line comment in *.coffee ?
I'd advise against this. JSDoc-ing all of your code is a laborious process that's likely to yield little to no benefit from the Closure Compiler. Outside of Google itself, hardly anyone does this. CoffeeScripters/JavaScripters generally prefer lightweight documentation tools like docco.
Also, while Closure Compiler has the Google brand name behind it, UglifyJS has proven to be the more efficient minification tool in many cases. (jQuery recently switched to it.)
One more question: is there a way to keep a single-line comment in *.coffee ?
Yes:
### foo ###
or
`// foo`