This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
static-share/scripts/build-js.sh

22 lines
578 B
Bash
Raw Normal View History

2016-09-05 08:36:06 +01:00
#!/usr/bin/env bash
set -e
if [ "$NODE_ENV" = "production" ]
then
echo ">>> WARNING: Building in Production Mode!"
fi
uglifyjs node_modules/jquery/dist/jquery.js --compress --screw-ie8 --define --stats --keep-fnames -o static/build/js/jquery.js
echo ">> Building Application JS..."
browserify -t [ babelify ] static/src/js/app.js -o static/build/js/app.js
if [ "$NODE_ENV" = "production" ]
then
echo ">> Compressing Application..."
uglifyjs static/build/js/app.js --compress --screw-ie8 --define --stats --keep-fnames -o static/build/js/app.js
fi
echo "> JS Built!"