a73007388f
* bump Next in playground * convert legacy Link after Next.js bump * update yarn.lock * switch to npm workspaces * move `packages/playground-*` to `playgrounds/*` * use `npm` instead of `yarn` * sync package-lock.json * use node 20 for insiders releases
18 lines
391 B
Bash
Executable File
18 lines
391 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Known variables
|
|
outdir="./dist"
|
|
name="headlessui"
|
|
input="./src/index.ts"
|
|
|
|
# Setup shared options for esbuild
|
|
sharedOptions=()
|
|
sharedOptions+=("--bundle")
|
|
sharedOptions+=("--platform=browser")
|
|
sharedOptions+=("--target=es2020")
|
|
|
|
# Generate actual builds
|
|
npx esbuild $input --format=esm --outfile=$outdir/$name.esm.js --sourcemap ${sharedOptions[@]} $@ --watch
|
|
|