@@ -41,9 +41,9 @@ Authenticate with Azure to get a deployment token for Azure Static Web Apps, usi
41
41
42
42
``` azstatic-cli
43
43
swa login
44
+ [--subscription-id]
44
45
[--resource-group]
45
46
[--tenant-id]
46
- [--subscription-id]
47
47
[--client-id]
48
48
[--client-secret]
49
49
[--app-name]
@@ -138,19 +138,19 @@ swa init
138
138
139
139
### Examples
140
140
141
- #### Example 1: Create a new configuration interactively
141
+ #### Example 1: Create a new configuration interactively.
142
142
143
143
``` azstatic-cli
144
144
swa init
145
145
```
146
146
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.
148
148
149
149
``` azstatic-cli
150
150
swa init --yes
151
151
```
152
152
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.
154
154
155
155
``` azstatic-cli
156
156
swa init --config-name myApp
@@ -184,25 +184,25 @@ swa build
184
184
185
185
### Examples
186
186
187
- #### Example 1: Build the app, and optionally install dependencies
187
+ #### Example 1: Build the app, and optionally install dependencies.
188
188
189
189
``` azstatic-cli
190
190
swa build
191
191
```
192
192
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.
194
194
195
195
``` azstatic-cli
196
196
swa build --auto
197
197
```
198
198
199
- #### Example 3: Install dependencies for the front-end application
199
+ #### Example 3: Install dependencies for the front-end application.
200
200
201
201
``` azstatic-cli
202
202
swa build --app-location ./client
203
203
```
204
204
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.
206
206
207
207
``` azstatic-cli
208
208
swa build myApp
@@ -345,19 +345,19 @@ swa start
345
345
346
346
### Examples
347
347
348
- #### Example 1: Start the application with defaults
348
+ #### Example 1: Start the application with defaults.
349
349
350
350
``` azstatic-cli
351
351
swa start
352
352
```
353
353
354
- #### Example 2: Start the application with a front end dev server
354
+ #### Example 2: Start the application with a front end dev server.
355
355
356
356
``` azstatic-cli
357
357
swa start http://<APP_DEV_SERVER_HOST>:<APP_DEV_SERVER_PORT>
358
358
```
359
359
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.
361
361
362
362
``` azstatic-cli
363
363
swa start http://<APP_DEV_SERVER_HOST>:<APP_DEV_SERVER_PORT> --api-location http://localhost:7071
@@ -578,19 +578,12 @@ swa deploy my-otherapp
578
578
579
579
``` azstatic-cli
580
580
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]
589
582
```
590
583
591
584
### Examples
592
585
593
- #### Example 1: Deploy using a deployment token
586
+ #### Example 1: Deploy using a deployment token.
594
587
595
588
``` azstatic-cli
596
589
swa deploy ./dist/ --api-location ./api/ --deployment-token <TOKEN>
@@ -606,6 +599,7 @@ SWA_CLI_DEPLOYMENT_TOKEN=123 swa deploy ./dist/ --api-location ./api/
606
599
607
600
``` azstatic-cli
608
601
swa deploy
602
+ swa deploy myconfig
609
603
```
610
604
611
605
#### Example 4: Print the deployment token
@@ -620,40 +614,6 @@ swa deploy --print-token
620
614
swa deploy --env production
621
615
```
622
616
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
-
657
617
___ [ Global Parameters] ( #global-parameters ) ___
658
618
659
619
## swa db
@@ -670,7 +630,7 @@ swa db init --database-type <DATABASE_TYPE>
670
630
671
631
### Examples
672
632
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.
674
634
675
635
``` azstatic-cli
676
636
swa db init --database-type mssql
0 commit comments