jsdf / coffee-reactify

DEPRECATED – browserify transform to compile coffeescript + react jsx (cjsx)
MIT License
109 stars 7 forks source link

It is not working if using stdin as source #5

Open alihammad-gist opened 9 years ago

alihammad-gist commented 9 years ago

browserify -t coffee-reactify --extension=".cjsx" --extension=".coffee" - browserify -t coffee-reactify -

I get this error for above commands. It probaby wants .coffee or .cjsx file but the generated file by browserify is _stream_0.js for stdin. Can i tell coffee-reactify to also parse .js files?

/home/cocomo/dev/golang/src/bitbucket.org/cocomo/publicwall/_stream_0.js:1
fnnn = -> alert 'hello'
        ^
ParseError: Unexpected token
jsdf commented 9 years ago

Yeah I don't know about this, not really sure if it makes sense to allow the transform to apply to arbitrary extensions because then how does it know what input is js and what is coffee? Possibly could add a config option to do it but I'm not sure how browserify via stdin is supposed to be used