2017-07-29 11:46:01 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# array of files to minify
|
|
|
|
FILES=(inline main polyfills scripts styles vendor)
|
|
|
|
OPTIONS="-c toplevel,dead_code=true,unused=true"
|
|
|
|
|
|
|
|
for i in "${FILES[@]}"
|
|
|
|
do
|
|
|
|
echo "minify ${i} ..."
|
|
|
|
$(npm bin)/uglifyjs public/${i}.bundle.js ${OPTIONS} -o public/${i}.bundle.js
|
2017-07-29 16:50:14 +02:00
|
|
|
rm -f public/${i}.bundle.js.map
|
2017-07-29 11:46:01 +02:00
|
|
|
done
|