13 lines
320 B
Bash
Executable File
13 lines
320 B
Bash
Executable File
#!/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
|
|
rm -f public/${i}.bundle.js.map
|
|
done
|