samhuri.net/bin/minify-js.sh

16 lines
248 B
Bash
Executable file

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