7 ms·
you can try js2coffee which will convert all existing js file to coffee-script.
by butu5 15y ago
you can try js2coffee which will convert all existing js file to coffee-script.
- mildweed 15y agoI see no need to convert my js to coffee just so I can compile it back to js.
- gavinlynch 15y agoagree. I've never really considered anything about Javascript's syntax to be cumbersome. I've written server-side Ruby and appreciate the syntax... But two points: 1) The syntax wasn't the only thing that drew me to Ruby. 2) I just don't see an any real need morph my JS code into a similar syntax. Writing JS is pretty easy.
- nicksergeant 15y agoFWIW, I used js2coffee on a 400-line JS file powering an app today and the compiled version of the code (js->coffee->js) was noticeably faster than the straight JS version. The for-in efficiency is probably part of that. A quick way to port once: http://ricostacruz.com/js2coffee/ http://ricostacruz.com/js2coffee/