Skip to content

Commit 314d6ba

Browse files
authored
Update static-web-apps-cli.md
1 parent b5f6e12 commit 314d6ba

File tree

1 file changed

+15
-55
lines changed

1 file changed

+15
-55
lines changed

articles/static-web-apps/static-web-apps-cli.md

Lines changed: 15 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ Authenticate with Azure to get a deployment token for Azure Static Web Apps, usi
4141

4242
```azstatic-cli
4343
swa login
44+
[--subscription-id]
4445
[--resource-group]
4546
[--tenant-id]
46-
[--subscription-id]
4747
[--client-id]
4848
[--client-secret]
4949
[--app-name]
@@ -138,19 +138,19 @@ swa init
138138

139139
### Examples
140140

141-
#### Example 1: Create a new configuration interactively
141+
#### Example 1: Create a new configuration interactively.
142142

143143
```azstatic-cli
144144
swa init
145145
```
146146

147-
#### Example 2: Create a new configuration using default values for all options
147+
#### Example 2: Create a new configuration using default values for all options.
148148

149149
```azstatic-cli
150150
swa init --yes
151151
```
152152

153-
#### Example 3: Initialize the project using the configuration named "myApp" from the swa-cli.config.json file
153+
#### Example 3: Initialize the project using the configuration named "myApp" from the swa-cli.config.json file.
154154

155155
```azstatic-cli
156156
swa init --config-name myApp
@@ -184,25 +184,25 @@ swa build
184184

185185
### Examples
186186

187-
#### Example 1: Build the app, and optionally install dependencies
187+
#### Example 1: Build the app, and optionally install dependencies.
188188

189189
```azstatic-cli
190190
swa build
191191
```
192192

193-
#### Example 2: Detect how to build your app and run build commands after installing dependencies
193+
#### Example 2: Detect how to build your app and run build commands after installing dependencies.
194194

195195
```azstatic-cli
196196
swa build --auto
197197
```
198198

199-
#### Example 3: Install dependencies for the front-end application
199+
#### Example 3: Install dependencies for the front-end application.
200200

201201
```azstatic-cli
202202
swa build --app-location ./client
203203
```
204204

205-
#### Example 4: Use the configuration named `myApp` in *swa-cli.config.json* to build your front-end application
205+
#### Example 4: Use the configuration named `myApp` in *swa-cli.config.json* to build your front-end application.
206206

207207
```azstatic-cli
208208
swa build myApp
@@ -345,19 +345,19 @@ swa start
345345

346346
### Examples
347347

348-
#### Example 1: Start the application with defaults
348+
#### Example 1: Start the application with defaults.
349349

350350
```azstatic-cli
351351
swa start
352352
```
353353

354-
#### Example 2: Start the application with a front end dev server
354+
#### Example 2: Start the application with a front end dev server.
355355

356356
```azstatic-cli
357357
swa start http://<APP_DEV_SERVER_HOST>:<APP_DEV_SERVER_PORT>
358358
```
359359

360-
#### Example 3: Start the application with a front end and back end dev server
360+
#### Example 3: Start the application with a front end and back end dev server.
361361

362362
```azstatic-cli
363363
swa start http://<APP_DEV_SERVER_HOST>:<APP_DEV_SERVER_PORT> --api-location http://localhost:7071
@@ -578,19 +578,12 @@ swa deploy my-otherapp
578578

579579
```azstatic-cli
580580
swa deploy
581-
[--api-location]
582-
[--app-location]
583-
[--output-location]
584-
[--deployment-token]
585-
[--env]
586-
[--print-token]
587-
[--data-api-location]
588-
[--swa-config-location]
581+
[--yes]
589582
```
590583

591584
### Examples
592585

593-
#### Example 1: Deploy using a deployment token
586+
#### Example 1: Deploy using a deployment token.
594587

595588
```azstatic-cli
596589
swa deploy ./dist/ --api-location ./api/ --deployment-token <TOKEN>
@@ -606,6 +599,7 @@ SWA_CLI_DEPLOYMENT_TOKEN=123 swa deploy ./dist/ --api-location ./api/
606599

607600
```azstatic-cli
608601
swa deploy
602+
swa deploy myconfig
609603
```
610604

611605
#### Example 4: Print the deployment token
@@ -620,40 +614,6 @@ swa deploy --print-token
620614
swa deploy --env production
621615
```
622616

623-
### Parameters
624-
625-
___`--app-location, -a <PATH>`___
626-
627-
The folder containing the source code of the front-end application. Default is `.`.
628-
629-
___`--api-location, -i <PATH>`___
630-
631-
The folder containing the source code of the API application.
632-
633-
___`--output-location, -O <PATH>`___
634-
635-
The folder containing the built source of the front-end application. The path is relative to `--app-location`. Default is `.`.
636-
637-
___`--deployment-token, -t <TOKEN>`___
638-
639-
Secret token used to authenticate with the Azure Static Web Apps service.
640-
641-
___`--env, -e <ENVIRONMENT_NAME>`___
642-
643-
Named environment that you want to deploy to.
644-
645-
___`--print-token`___
646-
647-
Print the deployment token for the Static Web Apps resource.
648-
649-
___`--data-api-location, -d <PATH>`___
650-
651-
The folder containing the database configuration file.
652-
653-
___`--swa-config-location, -w <PATH>`___
654-
655-
The path to the directory containing the staticwebapp.config.json file used for the deployment.
656-
657617
___[Global Parameters](#global-parameters)___
658618

659619
## swa db
@@ -670,7 +630,7 @@ swa db init --database-type <DATABASE_TYPE>
670630

671631
### Examples
672632

673-
#### Example 1: Generate a sample database connection configuration folder for an Azure SQL database
633+
#### Example 1: Generate a sample database connection configuration folder for an Azure SQL database.
674634

675635
```azstatic-cli
676636
swa db init --database-type mssql

0 commit comments

Comments
 (0)