Skip to content

Commit cfd8b16

Browse files
authored
chore(docs): Update sync docs for local sync (#256)
1 parent 377295a commit cfd8b16

File tree

1 file changed

+30
-23
lines changed

1 file changed

+30
-23
lines changed

website/docs/cli/configuration.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ sync:
3737
- app-id: [PORTALS_APP_ID]
3838
channel: [CHANNEL]
3939
directory-name: [DIRECTORY_NAME]
40-
- app-id: [PORTALS_APP_ID]
41-
channel: [CHANNEL]
40+
- file-path: [PATH_TO_DIST_FOLDER]
4241
directory-name: [DIRECTORY_NAME]
4342
# ... (add more apps if needed)
4443

@@ -48,28 +47,34 @@ token: [PORTALS_AUTH_TOKEN]
4847
### Configuration Options
4948
5049
1. **`sync` (List of Apps)**
51-
5250
- This is a list of apps that you want to synchronize. Each app is specified as a dictionary with the following attributes.
53-
54-
- **`app-id` (Required)**
55-
56-
- Type: String
57-
- Description: The unique identifier for the Appflow application you want to sync.
58-
59-
- **`channel` (Optional)**
60-
61-
- Type: String
62-
- Default: `production`
63-
- Description: The channel of the Appflow application to be synchronized.
64-
65-
- **`directory-name` (Optional)**
66-
- Type: String
67-
- Default: the `app-id` will be used
68-
- Description: The directory name where the synchronized app will be saved.
69-
70-
2. **`token` (Required)**
51+
An app can be either a remote app or a local app. A remote app is an app that is hosted on Appflow.
52+
A local app is an app that is hosted locally on your machine.
53+
54+
- Remote Configuration Options
55+
- **`app-id` (Required)**
56+
- Type: String
57+
- Description: The unique identifier for the Appflow application you want to sync.
58+
59+
- **`channel` (Optional)**
60+
- Type: String
61+
- Default: `production`
62+
- Description: The channel of the Appflow application to be synchronized.
63+
64+
- Local Configuration Options
65+
- **`file-path` (Required)**
66+
- Type: String
67+
- Description: The path to the local build folder to be synchronized.
68+
69+
- Common Configuration Options
70+
- **`directory-name` (Optional)**
71+
- Type: String
72+
- Default: the `app-id` or the last path component of `file-path` will be used
73+
- Description: The directory name where the synchronized app will be saved.
74+
75+
2. **`token` (Optional)**
7176
- Type: String
72-
- Description: The authentication token required to access Portals and perform sync operations. This token should be kept secure, as it provides access to your Appflow deployments.
77+
- Description: The authentication token required to access Portals and perform sync operations. This token should be kept secure, as it provides access to your Appflow deployments. This is required if you want to sync a remote app.
7378

7479
### Usage
7580

@@ -90,11 +95,13 @@ token: [PORTALS_AUTH_TOKEN]
9095
directory-name: home
9196
- app-id: a81b2440
9297
directory-name: cart
98+
- file-path: /Users/username/my-app/dist
99+
directory-name: my-app
93100
```
94101

95102
2. **`token` Section**
96103

97-
- In the `token` section, provide your Appflow Personal Access Token.
104+
- In the `token` section, provide your Appflow Personal Access Token if you have remote applications.
98105

99106
Example:
100107

0 commit comments

Comments
 (0)