r/coffeescript • u/FredyC • Dec 05 '14
Use Coffeescript snippet in article with JS translation
I am wondering if there is some tool, that would allow me to inject code snippet in the article with the option to switch to compiled JS right in place. I am writing some articles and I don't want to scare away haters. I am almost sure I have seen something like that, but I cannot really remember where it was.
Edit: I should probably mention that it's for gamedev.net and as far as I know, there isn't probably option to inject these advanced tools. So maybe instead if there would be possibility to create link that leads to compiled JS?
View all comments
Show parent comment
3
u/Piercey4 Dec 06 '14
You can remove the closure by added the 'bare' option.
http://codepen.io/anon/pen/wBMWXq