#!/bin/sh
# Roll the ES modules of src/ up into the UMD bundle that package.json
# declares as "main".  Upstream's Makefile does the same, with a rollup old
# enough to take its options from bundle_config.js.
set -e

version=$(node -p "require('./package.json').version")

rollup -f umd -n CachedIterable --amd.id cached-iterable \
    --banner "/* cached-iterable@$version */" \
    -o index.js src/index.mjs
