samhuri.net/bin/minify-js.sh
2014-03-07 16:45:31 -08:00

16 lines
219 B
Bash
Executable file

#!/bin/sh
DIR=$(dirname "$0")
UGLIFY="uglifyjs"
function minify() {
INPUT="$1"
"$UGLIFY" --compress --screw-ie8 "$INPUT"
}
if [[ "$1" != "" ]]; then
minify "$1"
else
echo "usage: $0 [input file]"
exit 1
fi