sublime-better-coffeescript icon indicating copy to clipboard operation
sublime-better-coffeescript copied to clipboard

Add support for Coffee-React

Open IvanTorresEdge opened this issue 11 years ago • 10 comments

https://github.com/jsdf/coffee-react

IvanTorresEdge avatar May 12 '14 07:05 IvanTorresEdge

+1

pistachiomatt avatar May 19 '14 02:05 pistachiomatt

As a workaround, you can compile cjsx files by creating symbolic link from cjsx executable to e.g. ~/bin/coffee and setting ~/bin as "binDir" in CoffeeScript.sublime-settings. Also remember to set "envPATH" to directory containing node executable (e.g. ~/nvm/v0.10.28/bin). Works well with both regular and cjsx "enhanced" .coffee files :)

hoppula avatar Jun 04 '14 08:06 hoppula

https://github.com/reactjs/sublime-react now has support for cjsx as well, you get snippets and cjsx syntax highlighting.

hoppula avatar Jun 04 '14 08:06 hoppula

This is great news!

pistachiomatt avatar Jun 04 '14 21:06 pistachiomatt

I'd like to add that when I type the last slash in <div></ ST tries to complete the closing tag, resulting in <div></div>, which is a very nice experience.

Maybe I am asking too much.

felixhao28 avatar Mar 17 '15 07:03 felixhao28

Hm, reactjs/sublime-react is deprecated now and they suggest to use babel/babel-sublime, but I don't see any support for CJSX files there. My main concern is, that I have configured BetterCoffeescript to "checkSyntaxOnSave" and leaving syntax set as CoffeeScript generates error when using JSX.

Would be really helpful if BS would allow to configure exact binary to execute instead of looking for coffee executable in "binDir".

danielkcz avatar Apr 15 '15 05:04 danielkcz

It looks like babel-sublime will never support CJSX, so this seems like the logical place to add full support. I'm redirecting folks from babel-sublime to this issue.

chrisvfritz avatar Apr 18 '15 16:04 chrisvfritz

As the maintainer of babel-sublime, I can confirm that we will not support CJSX. If sublime-better-coffeescript takes on supporting CJSX, I'd be more than happy to drop in note in the README referring users over here.

zertosh avatar Apr 18 '15 18:04 zertosh

+1 for CJSX support!

mvaivre avatar Jun 18 '15 08:06 mvaivre

:+1:

jamesfzhang avatar Aug 10 '15 18:08 jamesfzhang