samhuri.net/bin/minify-js.sh
2017-05-19 13:17:17 -07:00

16 lines
225 B
Bash
Executable file

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