@webflow/webflow-cli 1.19.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +135 -287
- package/dist/cloud-scaffolds/astro/README.md +44 -16
- package/dist/cloud-scaffolds/astro/src/env.d.ts +6 -0
- package/dist/cloud-scaffolds/astro/src/layouts/Layout.astro +2 -2
- package/dist/cloud-scaffolds/astro/src/pages/index.astro +42 -36
- package/dist/cloud-scaffolds/astro/webflow.json +7 -6
- package/dist/cloud-scaffolds/nextjs/README.md +34 -2
- package/dist/cloud-scaffolds/nextjs/eslint.config.mjs +6 -1
- package/dist/cloud-scaffolds/nextjs/src/app/globals.css +1 -1
- package/dist/cloud-scaffolds/nextjs/src/app/layout.tsx +1 -1
- package/dist/cloud-scaffolds/nextjs/src/app/page.css +45 -0
- package/dist/cloud-scaffolds/nextjs/src/app/page.tsx +19 -53
- package/dist/cloud-scaffolds/nextjs/src/webflow.d.ts +14 -0
- package/dist/cloud-scaffolds/nextjs/webflow.json +7 -3
- package/dist/index.js +83 -83
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @webflow/webflow-cli
|
|
2
2
|
|
|
3
|
+
## 1.20.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f5355d1: Changed default extension for component files to jsx, when using deprecated webflow devlink sync. File extension still can be configured using fileExtensions property in manifest file.
|
|
8
|
+
- 08f6430: The "webflow cloud init" command has been updated to use the new "webflow devlink export" command. The Astro and next.js scaffolds has also been updated to make use of new DevLink features.
|
|
9
|
+
|
|
10
|
+
## 1.20.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- d77f3b7: Adds global session storage and new auth commands. Running `webflow auth login` now saves credentials to both `~/.config/webflow/auth.json` (macOS/Linux) or `%APPDATA%\webflow\auth.json` (Windows) **and** the project `.env` file (`WEBFLOW_API_TOKEN`), so existing 1.x workflows continue to work without changes. Two new commands: `webflow auth status` shows the currently logged-in user and active scopes; `webflow auth logout` removes the stored session. The `WEBFLOW_API_TOKEN` environment variable continues to work as a CI/CD override.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 067f4cf: Change version flag from `-V` to `-v` for convenience
|
|
19
|
+
|
|
3
20
|
## 1.19.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,371 +1,219 @@
|
|
|
1
1
|
# @webflow/webflow-cli
|
|
2
2
|
|
|
3
|
-
The Webflow CLI
|
|
3
|
+
The Webflow CLI lets you manage Webflow sites, CMS content, assets, and code components from the command line.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
You can install the Webflow CLI globally on your machine using npm:
|
|
8
|
-
|
|
9
7
|
```shell
|
|
10
|
-
npm
|
|
8
|
+
npm install -g @webflow/webflow-cli
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Commands
|
|
14
12
|
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
13
|
+
- [Authentication](#authentication)
|
|
14
|
+
- [Sites](#sites)
|
|
15
|
+
- [CMS](#cms)
|
|
16
|
+
- [Assets](#assets)
|
|
17
|
+
- [DevLink Import (Code Components)](#devlink-import-code-components)
|
|
18
|
+
- [DevLink Export](#devlink-export)
|
|
19
|
+
- [Designer Extensions](#designer-extensions)
|
|
20
|
+
- [Global Options](#global-options)
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
---
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
## Authentication
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
- **`--manifest <path>`** - Path to a manifest .json file or directory containing webflow.json. Default: `./webflow.json`
|
|
25
|
-
- **`--skip-update-check`** - Skip checking for `@webflow` packages updates
|
|
26
|
+
Authenticate with Webflow and save credentials locally.
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
```shell
|
|
29
|
+
webflow auth login # OAuth login — saves token to .env
|
|
30
|
+
webflow auth login --force # Re-authenticate even if credentials exist
|
|
31
|
+
```
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
---
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
## Sites
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
Manage Webflow sites from the CLI.
|
|
34
38
|
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"components": ["src/components/**/*.webflow.tsx"]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
39
|
+
```shell
|
|
40
|
+
webflow sites list # List all sites in your workspace
|
|
41
|
+
webflow sites get <siteId> # Get details for a specific site
|
|
42
|
+
webflow sites domains --site <siteId> # List custom domains for a site
|
|
43
|
+
webflow sites publish --site <siteId> # Publish a site
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **`name`** (required): The display name of your library
|
|
48
|
-
- **`description`** (optional): A description of your library
|
|
49
|
-
- **`components`** (required): Glob pattern(s) for your component files
|
|
50
|
-
- **`id`** (optional): Library ID (auto-generated on first share)
|
|
51
|
-
- **`renderer`** (optional): Custom renderer configuration
|
|
52
|
-
- Can be a string path to a renderer module
|
|
53
|
-
- Or an object with `client` and `server` paths
|
|
54
|
-
- **`bundleConfig`** (optional): Path to a webpack configuration file for custom bundle overrides
|
|
46
|
+
### `sites list` options
|
|
55
47
|
|
|
56
|
-
|
|
48
|
+
| Flag | Description |
|
|
49
|
+
| ------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `--fields <fields>` | Comma-separated columns to display (id, displayName, shortName, timeZone, createdOn, lastUpdated, lastPublished) |
|
|
51
|
+
| `--json` | Output as JSON |
|
|
57
52
|
|
|
58
|
-
|
|
53
|
+
### `sites publish` options
|
|
59
54
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
| Flag | Description |
|
|
56
|
+
| --------------------- | ---------------------------------------------------------- |
|
|
57
|
+
| `--site <siteId>` | Site ID to publish |
|
|
58
|
+
| `--domain <domainId>` | Publish to a specific custom domain (repeatable) |
|
|
59
|
+
| `--page <pageId>` | Publish a single page instead of the full site |
|
|
60
|
+
| `--dry-run` | Preview what would be published without triggering a build |
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
---
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
2. Bundle your components for both client and server environments
|
|
68
|
-
3. Upload the bundles to Webflow's CDN
|
|
69
|
-
4. Register the library in your workspace
|
|
64
|
+
## CMS
|
|
70
65
|
|
|
71
|
-
|
|
66
|
+
Manage CMS collections and items.
|
|
72
67
|
|
|
73
|
-
|
|
68
|
+
```shell
|
|
69
|
+
# Collections
|
|
70
|
+
webflow cms collections list --site <siteId>
|
|
71
|
+
webflow cms collections get --site <siteId> --collection <collectionId>
|
|
72
|
+
webflow cms collections create --site <siteId> --name "Blog Posts" --slug "blog-posts"
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
# Fields
|
|
75
|
+
webflow cms fields create --collection <collectionId> --name "Author" --type PlainText
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
webflow
|
|
77
|
+
# Items
|
|
78
|
+
webflow cms items list --site <siteId> --collection <collectionId>
|
|
79
|
+
webflow cms items get --site <siteId> --collection <collectionId> --item <itemId>
|
|
80
|
+
webflow cms items create --site <siteId> --collection <collectionId> --data '{"name":"Hello"}'
|
|
81
|
+
webflow cms items update --site <siteId> --collection <collectionId> --item <itemId> --data '{"name":"Updated"}'
|
|
82
|
+
webflow cms items delete --site <siteId> --collection <collectionId> --item <itemId>
|
|
83
|
+
webflow cms items publish --site <siteId> --collection <collectionId> --item <itemId>
|
|
80
84
|
```
|
|
81
85
|
|
|
82
|
-
|
|
86
|
+
### `cms collections list` options
|
|
83
87
|
|
|
84
|
-
|
|
88
|
+
| Flag | Description |
|
|
89
|
+
| ------------------- | ---------------------------------------------------------------------- |
|
|
90
|
+
| `--sort-by <field>` | Sort by: `displayName`, `slug`, `lastUpdated` (default: `displayName`) |
|
|
91
|
+
| `--order <dir>` | `asc` or `desc` (default: `asc`) |
|
|
92
|
+
| `--json` | Output as JSON |
|
|
85
93
|
|
|
86
|
-
|
|
87
|
-
- **`--force`** - Force compilation even with warnings or type errors
|
|
88
|
-
- **`--debug-bundler`** - Display final bundler configurations for debugging
|
|
89
|
-
- **`--dev`** - Bundle in development mode for debugging
|
|
90
|
-
- **`--verbose`** - Display more detailed information
|
|
94
|
+
---
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
## Assets
|
|
93
97
|
|
|
94
|
-
|
|
98
|
+
Upload and manage site assets.
|
|
95
99
|
|
|
96
100
|
```shell
|
|
97
|
-
webflow
|
|
101
|
+
webflow assets list --site <siteId> # List assets
|
|
102
|
+
webflow assets upload <file> --site <siteId> # Upload a file
|
|
103
|
+
webflow assets update <assetId> --display-name "New name" # Update asset metadata
|
|
104
|
+
webflow assets folders --site <siteId> # List asset folders
|
|
105
|
+
webflow assets folders create --site <siteId> --name "Images"
|
|
98
106
|
```
|
|
99
107
|
|
|
100
|
-
|
|
108
|
+
### `assets list` options
|
|
101
109
|
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
| Flag | Description |
|
|
111
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| `--folder <folderId>` | Filter by folder |
|
|
113
|
+
| `--sort-by <field>` | Sort by: `displayName`, `originalFileName`, `contentType`, `size`, `lastUpdated` (default: `displayName`) |
|
|
114
|
+
| `--order <dir>` | `asc` or `desc` (default: `asc`) |
|
|
115
|
+
| `--fields <fields>` | Comma-separated columns to display |
|
|
116
|
+
| `--limit <n>` | Max assets to return |
|
|
117
|
+
| `--offset <n>` | Skip N assets (for pagination) |
|
|
118
|
+
| `--json` | Output as JSON |
|
|
104
119
|
|
|
105
|
-
|
|
120
|
+
### `assets upload` options
|
|
106
121
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- **`--verbose`** - Display more detailed information
|
|
122
|
+
| Flag | Description |
|
|
123
|
+
| ---------------------- | ----------------------------------- |
|
|
124
|
+
| `--name <displayName>` | Display name (defaults to filename) |
|
|
125
|
+
| `--folder <folderId>` | Upload into a folder |
|
|
126
|
+
| `--dry-run` | Preview without uploading |
|
|
113
127
|
|
|
114
|
-
|
|
128
|
+
**Supported file types:** PNG, JPG, JPEG, GIF, SVG, WEBP, AVIF (≤ 4 MB); PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, CSV, ODT, ODS, ODP, JSON, Lottie (≤ 10 MB)
|
|
115
129
|
|
|
116
|
-
|
|
130
|
+
---
|
|
117
131
|
|
|
118
|
-
|
|
132
|
+
## DevLink Import (Code Components)
|
|
133
|
+
|
|
134
|
+
Build and import React component libraries to your Webflow workspace.
|
|
119
135
|
|
|
120
136
|
```shell
|
|
121
|
-
webflow library
|
|
137
|
+
webflow devlink import # Build and share your component library
|
|
138
|
+
webflow devlink bundle # Build locally without sharing
|
|
122
139
|
```
|
|
123
140
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
#### Customizing Bundle Configuration
|
|
127
|
-
|
|
128
|
-
You can customize the webpack configuration used to bundle your components by providing a `bundleConfig` option in your `webflow.json` file. This allows you to add custom loaders, plugins, or modify the build process.
|
|
141
|
+
Aliases: `webflow library share`, `webflow library bundle`
|
|
129
142
|
|
|
130
|
-
|
|
143
|
+
### Prerequisites
|
|
131
144
|
|
|
132
|
-
|
|
145
|
+
Create a `webflow.json` in your project root:
|
|
133
146
|
|
|
134
147
|
```json
|
|
135
148
|
{
|
|
136
149
|
"library": {
|
|
137
150
|
"name": "My Component Library",
|
|
138
|
-
"
|
|
139
|
-
"
|
|
151
|
+
"description": "A collection of custom components",
|
|
152
|
+
"components": ["src/components/**/*.webflow.tsx"]
|
|
140
153
|
}
|
|
141
154
|
}
|
|
142
155
|
```
|
|
143
156
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
Your bundle config file can export configurations in three ways:
|
|
147
|
-
|
|
148
|
-
**1. Static Object**
|
|
149
|
-
|
|
150
|
-
Export a static configuration object:
|
|
151
|
-
|
|
152
|
-
```js
|
|
153
|
-
// webpack.webflow.js
|
|
154
|
-
module.exports = {
|
|
155
|
-
mode: "production",
|
|
156
|
-
devtool: "source-map",
|
|
157
|
-
module: {
|
|
158
|
-
rules: (currentRules) => [
|
|
159
|
-
...currentRules,
|
|
160
|
-
{ test: /\.svg$/, use: ["@svgr/webpack"] },
|
|
161
|
-
],
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**2. Function (Environment-Specific)**
|
|
167
|
-
|
|
168
|
-
Export a function that receives the environment (`Environment.Client` or `Environment.Server`) and returns a configuration:
|
|
169
|
-
|
|
170
|
-
```js
|
|
171
|
-
// webpack.webflow.js
|
|
172
|
-
const { Environment } = require("@webflow/data-types");
|
|
173
|
-
|
|
174
|
-
module.exports = (env) => ({
|
|
175
|
-
mode: env === Environment.Client ? "production" : "development",
|
|
176
|
-
devtool: env === Environment.Client ? "source-map" : false,
|
|
177
|
-
module: {
|
|
178
|
-
rules: (currentRules) => [
|
|
179
|
-
...currentRules,
|
|
180
|
-
{
|
|
181
|
-
test: env === Environment.Client ? /\.client\.js$/ : /\.server\.js$/,
|
|
182
|
-
use: "custom-loader",
|
|
183
|
-
},
|
|
184
|
-
],
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**3. Array (Multiple Configs)**
|
|
190
|
-
|
|
191
|
-
Export an array of objects and/or functions to merge multiple configurations:
|
|
192
|
-
|
|
193
|
-
```js
|
|
194
|
-
// webpack.webflow.js
|
|
195
|
-
const { Environment } = require("@webflow/data-types");
|
|
196
|
-
const {
|
|
197
|
-
styledComponentsBundleConfig,
|
|
198
|
-
} = require("@webflow/styled-components-utils");
|
|
199
|
-
|
|
200
|
-
module.exports = [
|
|
201
|
-
// Include third-party config
|
|
202
|
-
styledComponentsBundleConfig,
|
|
203
|
-
|
|
204
|
-
// Add environment-specific settings
|
|
205
|
-
(env) => ({
|
|
206
|
-
mode: env === Environment.Client ? "production" : "development",
|
|
207
|
-
}),
|
|
208
|
-
|
|
209
|
-
// Add custom rules
|
|
210
|
-
{
|
|
211
|
-
module: {
|
|
212
|
-
rules: (currentRules) => [
|
|
213
|
-
...currentRules,
|
|
214
|
-
{ test: /\.svg$/, use: ["@svgr/webpack"] },
|
|
215
|
-
],
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
];
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
##### Common Use Cases
|
|
222
|
-
|
|
223
|
-
**Adding a Custom Loader**
|
|
224
|
-
|
|
225
|
-
```js
|
|
226
|
-
module.exports = {
|
|
227
|
-
module: {
|
|
228
|
-
rules: (currentRules) => [
|
|
229
|
-
...currentRules,
|
|
230
|
-
{
|
|
231
|
-
test: /\.scss$/,
|
|
232
|
-
use: ["style-loader", "css-loader", "sass-loader"],
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**Modifying an Existing Loader**
|
|
240
|
-
|
|
241
|
-
```js
|
|
242
|
-
module.exports = {
|
|
243
|
-
module: {
|
|
244
|
-
rules: (currentRules) =>
|
|
245
|
-
currentRules.map((rule) => {
|
|
246
|
-
// Extend the CSS loader configuration
|
|
247
|
-
if (rule.test instanceof RegExp && rule.test.test("test.css")) {
|
|
248
|
-
// Modify the rule...
|
|
249
|
-
return modifiedRule;
|
|
250
|
-
}
|
|
251
|
-
return rule;
|
|
252
|
-
}),
|
|
253
|
-
},
|
|
254
|
-
};
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**Using CSS-in-JS Library Configs**
|
|
258
|
-
|
|
259
|
-
```js
|
|
260
|
-
const {
|
|
261
|
-
styledComponentsBundleConfig,
|
|
262
|
-
} = require("@webflow/styled-components-utils");
|
|
263
|
-
|
|
264
|
-
// For styled-components
|
|
265
|
-
module.exports = styledComponentsBundleConfig;
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
##### Merging Behavior
|
|
269
|
-
|
|
270
|
-
When multiple configs are provided (via array), they are merged with the following behavior:
|
|
271
|
-
|
|
272
|
-
- **Regular properties**: Later configs override earlier ones
|
|
273
|
-
- **Module rules**: Rules transformation functions are chained together in order
|
|
274
|
-
- **Plugins**: Plugin arrays are concatenated
|
|
275
|
-
- **ModuleFederationPlugin shared**: Shared dependency configurations are merged
|
|
276
|
-
|
|
277
|
-
##### Blocked Properties
|
|
157
|
+
### `devlink import` options
|
|
278
158
|
|
|
279
|
-
|
|
159
|
+
| Flag | Description |
|
|
160
|
+
| --------------------- | --------------------------------------------------- |
|
|
161
|
+
| `--api-token <token>` | Workspace API token (overrides `WEBFLOW_API_TOKEN`) |
|
|
162
|
+
| `--force` | Compile even with warnings or type errors |
|
|
163
|
+
| `--dev` | Bundle in development mode |
|
|
280
164
|
|
|
281
|
-
|
|
282
|
-
- `output`
|
|
283
|
-
- `target`
|
|
165
|
+
### `devlink bundle` options
|
|
284
166
|
|
|
285
|
-
|
|
167
|
+
| Flag | Description |
|
|
168
|
+
| ---------------------- | ----------------------------------------------------- |
|
|
169
|
+
| `--public-path <path>` | Set the public path for the bundle |
|
|
170
|
+
| `--output-path <path>` | Set the output path for the bundle (default `./dist`) |
|
|
171
|
+
| `--force` | Compile even with warnings or type errors |
|
|
172
|
+
| `--dev` | Bundle in development mode |
|
|
286
173
|
|
|
287
|
-
|
|
174
|
+
---
|
|
288
175
|
|
|
289
|
-
|
|
176
|
+
## DevLink Export
|
|
290
177
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
To create a new extension, use the `webflow extension init` command:
|
|
294
|
-
|
|
295
|
-
```shell
|
|
296
|
-
webflow extension init my-extension
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
This command creates a new directory named `my-extension` with a basic scaffold for your extension. See more details about the scaffolding on the [App structure reference](https://docs.developers.webflow.com/v2.0.0/reference/app-structure).
|
|
300
|
-
|
|
301
|
-
#### Running your Extension Locally
|
|
302
|
-
|
|
303
|
-
Navigate to the newly created folder for your extension. You can serve your extension locally using the following command. The default port is set to 1337.
|
|
178
|
+
Export Webflow Components from your Webflow Site
|
|
304
179
|
|
|
305
180
|
```shell
|
|
306
|
-
|
|
181
|
+
webflow devlink export # Export Webflow Components
|
|
307
182
|
```
|
|
308
183
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
##### Options
|
|
184
|
+
### `devlink export` options
|
|
312
185
|
|
|
313
|
-
|
|
186
|
+
| Flag | Description |
|
|
187
|
+
| --------------------- | --------------------------------------------------- |
|
|
188
|
+
| `--api-token <token>` | Workspace API token (overrides `WEBFLOW_API_TOKEN`) |
|
|
189
|
+
| `--site <siteId>` | Site ID to export from |
|
|
314
190
|
|
|
315
|
-
|
|
191
|
+
---
|
|
316
192
|
|
|
317
|
-
|
|
193
|
+
## Designer Extensions
|
|
318
194
|
|
|
319
|
-
|
|
320
|
-
npm run build
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
This will run the `webflow extension bundle` CLI command, which will output a `bundle.zip` file in your extension’s directory. You can upload this extension to Webflow via the "Integrations" tab in your workspace settings. Note: The extension size limit is 5MB.
|
|
324
|
-
|
|
325
|
-
### Devlink
|
|
326
|
-
|
|
327
|
-
DevLink allows you to visually design and build web components for React directly in Webflow. [Learn more in our DevLink overview,](https://webflow.com/devlink) and read the [DevLink documentation](https://docs.developers.webflow.com/docs/devlink-documentation-and-usage-guide).
|
|
195
|
+
Scaffold and serve Webflow Designer Extensions.
|
|
328
196
|
|
|
329
197
|
```shell
|
|
330
|
-
|
|
198
|
+
webflow extension init <name> # Create a new extension project
|
|
199
|
+
webflow extension serve [port] # Serve locally (default port: 1337)
|
|
200
|
+
webflow extension bundle # Build and package for upload (outputs bundle.zip)
|
|
331
201
|
```
|
|
332
202
|
|
|
333
|
-
|
|
203
|
+
---
|
|
334
204
|
|
|
335
|
-
|
|
205
|
+
## Global Options
|
|
336
206
|
|
|
337
|
-
|
|
207
|
+
Available on all commands:
|
|
338
208
|
|
|
339
|
-
|
|
209
|
+
| Flag | Description |
|
|
210
|
+
| --------------------- | -------------------------------------------------- |
|
|
211
|
+
| `--no-input` | Disable interactive prompts (for CI/CD) |
|
|
212
|
+
| `--manifest <path>` | Path to `webflow.json` (default: `./webflow.json`) |
|
|
213
|
+
| `--skip-update-check` | Skip checking for package updates |
|
|
214
|
+
| `--verbose` | Show detailed output |
|
|
340
215
|
|
|
341
|
-
|
|
342
|
-
{
|
|
343
|
-
"host": "https://api.wfdev.io:8443",
|
|
344
|
-
"rootDir": "./devlink",
|
|
345
|
-
"siteId": "[YOUR SITE ID]",
|
|
346
|
-
"authToken": "[API TOKEN]"
|
|
347
|
-
}
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
JavaScript:
|
|
351
|
-
|
|
352
|
-
```js
|
|
353
|
-
module.exports = {
|
|
354
|
-
host: "https://api.wfdev.io:8443",
|
|
355
|
-
rootDir: "./devlink",
|
|
356
|
-
siteId: "[YOUR SITE ID]",
|
|
357
|
-
authToken: process.env.WF_TOKEN,
|
|
358
|
-
};
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
You'll have to generate an API token to your application. This can be done on your Webflow project
|
|
362
|
-
by going to Site Settings > Integrations.
|
|
363
|
-
|
|
364
|
-
#### Sync your design system
|
|
365
|
-
|
|
366
|
-
```shell
|
|
367
|
-
npx webflow devlink sync
|
|
368
|
-
```
|
|
216
|
+
---
|
|
369
217
|
|
|
370
218
|
## License
|
|
371
219
|
|
|
@@ -1,20 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Webflow Cloud + Astro
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
This is an [Astro](https://astro.build) project bootstrapped with [`webflow cloud init`](https://developers.webflow.com/webflow-cloud/intro).
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
First, install dependencies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then, export your Webflow components:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
webflow devlink export
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This will create the `webflow/` directory with your Webflow components and styles.
|
|
20
|
+
|
|
21
|
+
Finally, run the development server:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run dev
|
|
5
25
|
```
|
|
6
26
|
|
|
7
|
-
|
|
8
|
-
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
|
|
9
|
-
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
|
|
27
|
+
Open [http://localhost:4321](http://localhost:4321) with your browser to see the result.
|
|
10
28
|
|
|
11
|
-
|
|
29
|
+
You can start editing the page by modifying `src/pages/index.astro`. The page auto-updates as you edit the file.
|
|
12
30
|
|
|
13
|
-
|
|
31
|
+
## Webflow Components
|
|
14
32
|
|
|
15
|
-
|
|
33
|
+
Your Webflow components are exported to `webflow/`. To update them when you make changes in Webflow:
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
```bash
|
|
36
|
+
webflow devlink export
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Learn more about [Webflow DevLink](https://developers.webflow.com/data/docs/devlink-overview).
|
|
40
|
+
|
|
41
|
+
## Project Structure
|
|
18
42
|
|
|
19
43
|
```text
|
|
20
44
|
/
|
|
@@ -25,12 +49,11 @@ Inside of your Astro project, you'll see the following folders and files:
|
|
|
25
49
|
│ │ └── Layout.astro
|
|
26
50
|
│ └── pages/
|
|
27
51
|
│ └── index.astro
|
|
28
|
-
|
|
52
|
+
├── webflow/ # Webflow components (generated)
|
|
53
|
+
└── webflow.json # Webflow configuration
|
|
29
54
|
```
|
|
30
55
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## 🧞 Commands
|
|
56
|
+
## Commands
|
|
34
57
|
|
|
35
58
|
All commands are run from the root of the project, from a terminal:
|
|
36
59
|
|
|
@@ -42,7 +65,12 @@ All commands are run from the root of the project, from a terminal:
|
|
|
42
65
|
| `npm run preview` | Preview your build locally, before deploying |
|
|
43
66
|
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
|
44
67
|
| `npm run astro -- --help` | Get help using the Astro CLI |
|
|
68
|
+
| `webflow devlink export` | Export Webflow components to `webflow/` |
|
|
69
|
+
| `webflow cloud deploy` | Deploy to Webflow Cloud |
|
|
45
70
|
|
|
46
|
-
##
|
|
71
|
+
## Learn More
|
|
47
72
|
|
|
48
|
-
|
|
73
|
+
- [Webflow Cloud Documentation](https://developers.webflow.com/webflow-cloud/intro)
|
|
74
|
+
- [Webflow DevLink Documentation](https://developers.webflow.com/data/docs/devlink-overview)
|
|
75
|
+
- [Astro Documentation](https://docs.astro.build)
|
|
76
|
+
- [Astro Discord](https://astro.build/chat)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { DevLinkProvider } from '../../
|
|
3
|
-
import "../../
|
|
2
|
+
import { DevLinkProvider } from '../../webflow/DevLinkProvider.js';
|
|
3
|
+
import "../../webflow/css/global.css"; // Webflow Styles
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!doctype html>
|