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
Alexander Polynomdivision 74904a2be5 build: Minify the JS
2018-09-15 14:45:38 +02:00

14 lines
324 B
Bash

#!/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