Last active
August 29, 2015 14:20
-
-
Save nemisj/bd5df196d264238a6fde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# this script will convert every file using babel | |
# in the lib folder which ends with es6.js | |
# and put it into the same folder using es5 prefix | |
# so lib/bla.es6.js will become lib/bla.es5.js | |
files=$(ls ./lib/*.es6.js); | |
for file in $files; do | |
new_file=$(echo $file | sed -e "s/es6/es5/") | |
./node_modules/.bin/babel $file > $new_file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment