Created
April 26, 2016 20:33
-
-
Save tabrindle/9affae679e8097737bc3e82ba7db1001 to your computer and use it in GitHub Desktop.
transpile sencha with babel
This file contains hidden or 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
#!/bin/bash | |
project=$(pwd) | |
OLD_MD5=`cat $project/sencha/.app-es6.md5` | |
CURRENT_MD5=`tree -Ds -P '*.js' --timefmt %T $project/sencha/app-es6 | md5` | |
if [ "$OLD_MD5" != "$CURRENT_MD5" ]; then | |
tree -Ds -P '*.js' --timefmt %T $project/sencha/app-es6 | md5 > $project/sencha/.app-es6.md5 | |
npm run build-prod | |
if [ $? -ne 0 ]; then | |
echo "Babel preprocessor failed" | ts '%T' | |
exit 1 | |
else | |
echo "Babel preprocessor successful" | ts '%T' | |
fi | |
else | |
echo "Checksums match: Skipping Babel transpile" | ts '%T' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment