mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 03:09:50 +08:00
* Migrating Core Salesforce Skills * Updating pr comments * updat reference * Updating a skill * Migrating Datacloud skills * Migrating Industries cloud skills * Validating - skills fixing --------- Co-authored-by: Sandip Kumar Yadav <sandipkumar.yadav+sfemu@salesforce.com>
35 lines
1.1 KiB
Bash
35 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Local Development Server — preview LWC components with hot reload (no deployment needed).
|
|
# Requires an active org connection. Commands install just-in-time on first run and open
|
|
# a browser with live preview. Changes to .js, .html, and .css files auto-reload instantly.
|
|
#
|
|
# Usage: Pass --target-org <alias> and choose the mode that matches your use case.
|
|
|
|
TARGET_ORG="${1:-}"
|
|
|
|
if [ -z "$TARGET_ORG" ]; then
|
|
echo "Usage: $0 <org-alias> [component|app|site]"
|
|
echo " component Preview a single LWC component in isolation (default)"
|
|
echo " app Preview a Lightning Experience app locally"
|
|
echo " site Preview an Experience Cloud site locally"
|
|
exit 1
|
|
fi
|
|
|
|
MODE="${2:-component}"
|
|
|
|
case "$MODE" in
|
|
component)
|
|
sf lightning dev component --target-org "$TARGET_ORG"
|
|
;;
|
|
app)
|
|
sf lightning dev app --target-org "$TARGET_ORG"
|
|
;;
|
|
site)
|
|
sf lightning dev site --target-org "$TARGET_ORG"
|
|
;;
|
|
*)
|
|
echo "Unknown mode: $MODE. Choose one of: component, app, site"
|
|
exit 1
|
|
;;
|
|
esac
|