Do you love CoffeeScript? Alternatively, you’ve to maintain Brownfield JavaScript based Applications?

CoffeeScript Logo
CoffeeScript Logo

Checkout Js2coffee! Js2coffee translates your JavaScript Code into nice, readable and valid CoffeeScript. In addition to the Js2coffee website (js2coffee.org), there is also an NPM package available. You can install it directly from the terminal

npm install js2coffee
# or globally
npm install js2coffee --g

You can translate your JS file easily by providing the following command.


"console.log('sample javascript file')" >> some.js
js2coffee some.js > some.coffee

I found this little package very handy to remove the smell from old JavaScript files and move them to more readable and maintainable CoffeeScript files.

What do you think? Is this a good solution for maintaining the old JavaScript code?