Skip to content

Instantly share code, notes, and snippets.

@duhast
Created April 14, 2014 23:19
Show Gist options
  • Save duhast/10689518 to your computer and use it in GitHub Desktop.
Save duhast/10689518 to your computer and use it in GitHub Desktop.
Migrate Rails project from pure JavaScript to CoffeeScript
#!/bin/bash
# install js2coffee first with `npm install js2coffee`
find ./app/assets/javascripts -iname "*.js" | \
while read I;
do
`js2coffee ${I} > ${I}.coffee`
echo "$I has been coffefied"
`rm ${I}`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment