You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update developer guide for optional manifest feature
- Document that webapplication.json is now optional
- Add folder-based discovery in webapplications/ folder
- Document auto-selection when running from inside webapp folder
- Update all fields to show they are optional with defaults
- Add console output examples showing warning messages
- Update troubleshooting section for new error scenarios
- Note that manifest watching only works when manifest exists
@@ -10,7 +10,9 @@ The `sf webapp dev` command enables local development of modern web applications
10
10
11
11
### Key Features
12
12
13
-
-**Auto-Discovery**: Automatically finds `webapplication.json` files in your project
13
+
-**Auto-Discovery**: Automatically finds webapps in `webapplications/` folder
14
+
-**Optional Manifest**: `webapplication.json` is optional - uses sensible defaults
15
+
-**Auto-Selection**: Automatically selects webapp when running from inside its folder
14
16
-**Interactive Selection**: Prompts with arrow-key navigation when multiple webapps exist
15
17
-**Authentication Injection**: Automatically adds Salesforce auth headers to API calls
16
18
-**Intelligent Routing**: Routes requests to dev server or Salesforce based on URL patterns
@@ -22,18 +24,15 @@ The `sf webapp dev` command enables local development of modern web applications
22
24
23
25
## Quick Start
24
26
25
-
### 1. Create `webapplication.json`in your project
27
+
### 1. Create your webapp in the `webapplications/` folder
26
28
27
-
```json
28
-
{
29
-
"name": "myApp",
30
-
"label": "My Application",
31
-
"version": "1.0.0",
32
-
"outputDir": "dist",
33
-
"dev": {
34
-
"command": "npm run dev"
35
-
}
36
-
}
29
+
```
30
+
my-project/
31
+
└── webapplications/
32
+
└── my-app/ # Your webapp folder
33
+
├── package.json
34
+
├── src/
35
+
└── webapplication.json # Optional!
37
36
```
38
37
39
38
### 2. Run the command
@@ -46,6 +45,12 @@ sf webapp dev --target-org myOrg --open
46
45
47
46
Browser opens to `http://localhost:4545` with your app running and Salesforce authentication ready.
48
47
48
+
> **Note**: `webapplication.json` is optional! If not present, the command uses:
49
+
>
50
+
> -**Name**: Folder name (e.g., "my-app")
51
+
> -**Dev command**: `npm run dev`
52
+
> -**Manifest watching**: Disabled
53
+
49
54
---
50
55
51
56
## Command Syntax
@@ -90,62 +95,96 @@ SF_LOG_LEVEL=debug sf webapp dev --target-org myOrg
90
95
91
96
## Webapp Discovery
92
97
93
-
The command automatically discovers `webapplication.json` files in your project, making the `--name` flag optional in most cases.
98
+
The command automatically discovers webapps in the `webapplications/` folder. Each subfolder is treated as a webapp, with `webapplication.json` being optional.
0 commit comments