5 ms·
"you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code" Am I missing something or is that line literally th
by Tichy 14y ago
"you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code"
Am I missing something or is that line literally the only explanation/documentation given as to what is literate CoffeeScript and how to use it? Must admit I have no idea how to use it now.
- talklittle 14y agoThe next sentence includes links to bits of the compiler in literate CoffeeScript. https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df It's writing a Markdown document, where the code blocks, indented 4 spaces, are executed. And the rest of the document is essentially nicely-formatted comments in the form of Markdown.
- mosselman 14y agoThanks for explaining.
- jashkenas 14y agoI've added a bit more clarification to that paragraph. Hopefully soon we'll get proper highlighting for it committed into GitHub, and then a simple link should make things dead obvious.
- Tichy 14y agoThanks!
- melvinmt 14y agoI assume you place the .litcoffee files next to the .coffee files and only the indented parts in the .litcoffee files will be compiled to JS?