This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/build.sh

14 lines
324 B
Bash
Raw Normal View History

2018-09-15 12:45:38 +00:00
#!/bin/bash
set -x
# Build the App
./node_modules/.bin/parcel build
# Minify the JS
if [ ! -d ./dist/minified_js ]; then
mkdir ./dist/minified_js
fi
for file in ./dist/*.js; do
echo "== MINIFYING $file =="
./node_modules/.bin/uglifyjs --mangle --compress -o "./dist/minified_js/$(basename $file)" -- $file
done