coffee-react-transform icon indicating copy to clipboard operation
coffee-react-transform copied to clipboard

Is there a “Try Coffee-React” page like on coffeescript.org?

Open alanhogan opened this issue 11 years ago • 8 comments

One of the trickiest things about writing CoffeeScript is that sometimes its syntax doesn’t compile into exactly the JS one thought it might. For this reason, the coffeescript.org “Try CoffeeScript” widget is invaluable.

I would want to be able to use the same sort of tool, one that enables paste-and-check, with whatever .cjsx I write. Is there such a page or tool already?

alanhogan avatar Jul 09 '14 21:07 alanhogan

Good Idea... Doesn't exist as yet but it should.

jsdf avatar Jul 10 '14 14:07 jsdf

Here you go: http://jsdf.github.io/coffee-react-transform/

jsdf avatar Jul 12 '14 06:07 jsdf

@jsdf That’s awesome, thanks. (Just got back from vacation recently)

I may have misunderstood coffee-react-transform. I guess I got it confused with coffee-react, which is a "drop-in replacement for the coffee executable”. I was expecting the transform demo to compile all the way to JavaScript.

To be clear, this demo tool is still very helpful.

What’s still missing is the ability for someone who is writing CJSX and wonders exactly what the equivalent JS is, to paste an arbitrary chunk of their code (possibly just CoffeeScript, possibly — and problematically — CoffeeScript with JSX syntax) into a converter to see what the browser will see.

Do you see what the problem is? No one preview tool handles all the conversions right now.

alanhogan avatar Jul 23 '14 01:07 alanhogan

Yep, I plan to add a tab with js output also, there is just currently a bug in coffee react which only occurs in the browser which I need to fix first

jsdf avatar Jul 23 '14 01:07 jsdf

awesomesauce happy reaction

alanhogan avatar Jul 23 '14 02:07 alanhogan

Oh — I created a Fluid app for your tool (on my computer) and created this icon for it. It’s nothing special, but if you want to add it to your page as a favicon or other sort of icon, feel free. cjsx

Source zip here (in Acorn format)

alanhogan avatar Jul 23 '14 18:07 alanhogan

Neat, thanks for that!

jsdf avatar Jul 24 '14 00:07 jsdf

Can we get this "http://jsdf.github.io/coffee-react-transform/" added to the README? It's very useful.

DylanPiercey avatar Jul 01 '15 05:07 DylanPiercey