#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
# set -o xtrace

# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"

SRC="src/index.js"
OUT="uppy.js"

OUTDIR="dist"
TRANSFORMS="[ babelify ]"
FLAGS="-t [ babelify ] --standalone Uppy"

rm -rf $OUTDIR
mkdir $OUTDIR

browserify $SRC $FLAGS > $OUTDIR/$OUT
