euchre-live

Euchre web-app for the socially distant family
git clone git://git.alexkarle.com/euchre-live.git
Log | Files | Refs | README | LICENSE

build.sh (477B) [raw]


      1 #!/bin/sh
      2 # build.sh -- build the JS bundle pre-deployment
      3 set -e
      4 die() {
      5     echo "$1" 1>&2
      6     exit 1
      7 }
      8 
      9 build() {
     10     out="$1"
     11     shift
     12     ./node_modules/.bin/esbuild \
     13         --bundle \
     14         --loader:.js=jsx \
     15         "$@" \
     16         assets/app.js \
     17         --outfile="public/asset/euchre-live.$out.js"
     18 }
     19 
     20 ROOT=$(dirname "$(dirname "$0")")
     21 cd $ROOT || die "unable to cd to $ROOT"
     22 
     23 build development --sourcemap
     24 build production --minify
     25 
     26 echo ">>> Build Success! <<<"