Last active
May 14, 2017 07:18
-
-
Save peey/ad360ae16e8ece0d6c5904acf278b4a0 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
#!/bin/bash | |
# usage instructions (on linux): | |
# 1. put the file in your path (e.g. "/usr/bin") | |
# 2. cd to packages/plugin-you-want-to-see-fixtures-of and run babel-see-fixtures | |
out=`mktemp --suffix=.js` | |
for D in `find test/fixtures -type d` | |
do | |
if [ -f "$D/actual.js" ]; then | |
echo -e "// $D\n" >> $out | |
fi | |
if [ -f "$D/options.json" ]; then | |
echo -e "// $D options" >> $out | |
cat "$D/options.json" >> $out | |
echo -e "\n" >> $out | |
fi | |
if [ -f "$D/actual.js" ]; then | |
echo -e "// actual" >> $out | |
cat "$D/actual.js" >> $out | |
echo -e "\n" >> $out | |
fi | |
if [ -f "$D/expected.js" ]; then | |
echo -e "// expected" >> $out | |
cat "$D/expected.js" >> $out | |
echo -e "\n" >> $out | |
fi | |
done | |
vi $out # replace with "subl $out", "gedit $out", etc. whichever editor you have installed/prefer | |
rm $out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment