Skip to content

Instantly share code, notes, and snippets.

@phillipalexander
Created August 9, 2013 21:28
Show Gist options
  • Save phillipalexander/6197388 to your computer and use it in GitHub Desktop.
Save phillipalexander/6197388 to your computer and use it in GitHub Desktop.
#!/bin/bash
for FILE in `find . -name "*.js" -type f -o -path './node_modules' -prune -o -path './components' -prune`
do
if [ -e $FILE ] ; then
COFFEE=${FILE//.js/.coffee}
echo "converting ${FILE} to ${COFFEE}"
js2coffee "$FILE" > "$COFFEE"
else
echo "File: {$1} does not exist!"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment