mirror of
https://github.com/Modernizr/Modernizr.git
synced 2026-01-09 15:47:55 -05:00
16 lines
294 B
Bash
Executable File
16 lines
294 B
Bash
Executable File
#/bin/sh
|
|
|
|
# sudo npm install -g uglify-js
|
|
|
|
IN=modernizr.js
|
|
OUT=modernizr.min.js
|
|
|
|
SIZE_MIN=$(uglifyjs "$IN" --extra --unsafe | tee "$OUT" | wc -c)
|
|
SIZE_GZIP=$(gzip -nfc --best "$OUT" | wc -c)
|
|
|
|
echo $SIZE_MIN bytes minified, $SIZE_GZIP bytes gzipped
|
|
|
|
if [ "$1" == "--test" ]; then
|
|
rm "$OUT"
|
|
fi
|