uppy/bin/build-bundle
Kevin van Zonneveld b988ef776d Decide on single-noun terminology
npm, umd, dist, package, cdn, module -> bundler -> bundle, and call it
that through-out
2016-02-17 11:09:08 +01:00

20 lines
434 B
Bash
Executable file

#!/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="${OUT:-uppy.js}"
OUTDIR="dist"
FLAGS="-t [ babelify ] --standalone Uppy"
mkdir -p "${OUTDIR}"
browserify ${@:-} $SRC $FLAGS > $OUTDIR/$OUT