Skip to content

Instantly share code, notes, and snippets.

@burisu
Forked from Stanback/coffee2js.sh
Last active July 11, 2019 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burisu/a9daa438ba8f31591a71fa1976e9ab06 to your computer and use it in GitHub Desktop.
Save burisu/a9daa438ba8f31591a71fa1976e9ab06 to your computer and use it in GitHub Desktop.
Convert all CoffeeScript files to Javascript (coffee2js)
#!/bin/sh
# Install coffeescript cli
npm -g install decaffeinate
# Convert all coffeescript files to javascript
find . -name "*.coffee" -exec decaffeinate --use-cs2 --disable-suggestion-comment {} \;
# Optionally delete original coffee files
find . -name "*.coffee" -exec rm {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment