Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/bin/bash
set -euo pipefail

# The build depends on the Vite+ CLI (`vp`) and Bun. `vp exec` runs project-local
# binaries from node_modules/.bin, so it works whether `vp` was installed via the
# official installer or as the `vite-plus` npm package (the latter does not ship
# the global `vpx` shim). Fail fast with an actionable message if either is missing.
for tool in vp bun; do
command -v "$tool" >/dev/null 2>&1 || {
echo "❌ '$tool' not found on PATH. Install Vite+ (https://vite.plus) and run 'vp install' before building." >&2
exit 1
}
done

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesnt seem needed if we already say in README to use vp install

bold=$(tput bold)
normal=$(tput sgr0)

Expand All @@ -23,7 +34,7 @@ log "🧵 Transpiling"
vp pack main.ts -d ts-to-es6 -f cjs

log "⚡️ Code generation"
vpx yellicode
vp exec yellicode

log '🧶 Bundling Angular SDK'
(cd src/scaffolds/angular-workspace &&
Expand Down Expand Up @@ -51,7 +62,7 @@ mv build/vue/v3.tgz dist/vue/v3.tgz
# We do this last so unneeded files are not included in the releases.
log '👀 Install + Linting + Build'

if vpx concurrently --kill-others-on-fail \
if vp exec concurrently --kill-others-on-fail \
"cd build/vue/v3 && vp install" \
"cd build/vue/v2 && vp install" \
"cd build/react && vp install" \
Expand Down