12 lines
286 B
Bash
12 lines
286 B
Bash
|
#!/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
|
||
|
done
|