A simple one-liner to convert all JavaScript to CoffeeScript
A simple one-liner to convert all JavaScript in a folder to CoffeeScript
First, make sure you have installed “js2coffee” ( and js2coffee.org is real cool for single files too ):
npm install js2coffee
And then just paste this:
for f in *.js; do js2coffee -it $f > ${f%%.*}.coffee; rm $f; done;
`-it` options modifies the spaces to tabs, remove it if you prefer spaces.
Enjoy!