Created
June 20, 2012 07:52
-
-
Save klodio/2958693 to your computer and use it in GitHub Desktop.
Use jsbeautifier to prettify your actual files, so you don't have to lose time making them beautiful.
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 | |
#relies on https://github.com/rickeyski/node-beautifier | |
for ARG in $* | |
do | |
filename="/tmp/jsbeautifile-"$RANDOM | |
node ~/node_modules/beautifier/bin/beautifier.js $ARG > filename | |
cat filename > $ARG | |
rm filename | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment