@webflow/webflow-cli 1.20.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 +7 -0
- 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 +80 -80
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
|
|
3
10
|
## 1.20.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -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>
|
|
@@ -1,62 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Layout from '../layouts/Layout.astro';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
// Import DevLink components from "../../webflow/*"
|
|
5
|
+
// import { ComponentName } from "../../webflow/ComponentName";
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
<Layout>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}}
|
|
17
|
-
>
|
|
18
|
-
<Container>
|
|
19
|
-
<Block
|
|
20
|
-
tag="div"
|
|
21
|
-
className="hero-split"
|
|
22
|
-
style={{
|
|
23
|
-
textAlign: 'center',
|
|
24
|
-
maxWidth: '600px',
|
|
25
|
-
margin: '0 auto'
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
<h1 class="margin-bottom-24px">Welcome to Webflow Cloud</h1>
|
|
29
|
-
<p class="margin-bottom-24px">This is a simple test using Basic components with enhanced styling.</p>
|
|
30
|
-
<div style={{marginTop: '12px'}}>
|
|
31
|
-
<Link
|
|
32
|
-
button={true}
|
|
33
|
-
options={{
|
|
34
|
-
href: "https://developers.webflow.com/webflow-cloud/getting-started"
|
|
35
|
-
}}
|
|
36
|
-
className="button-primary"
|
|
9
|
+
<section class="hero-section">
|
|
10
|
+
<div class="container">
|
|
11
|
+
<div class="hero-content">
|
|
12
|
+
<h1 class="hero-title">Welcome to Webflow Cloud</h1>
|
|
13
|
+
<p class="hero-description">Your Astro project is ready. Start building and sync your Webflow components and design system.</p>
|
|
14
|
+
<div class="hero-cta">
|
|
15
|
+
<a
|
|
16
|
+
href="https://developers.webflow.com/data-clients/docs/getting-started"
|
|
17
|
+
class="button-primary"
|
|
37
18
|
>
|
|
38
19
|
Get Started
|
|
39
|
-
</
|
|
20
|
+
</a>
|
|
40
21
|
</div>
|
|
41
|
-
</
|
|
42
|
-
</
|
|
43
|
-
</
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</section>
|
|
44
25
|
</Layout>
|
|
45
26
|
|
|
46
27
|
<style>
|
|
47
|
-
|
|
28
|
+
.hero-section {
|
|
29
|
+
min-height: 100vh;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hero-content {
|
|
36
|
+
text-align: center;
|
|
37
|
+
max-width: 600px;
|
|
38
|
+
margin: 0 auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.hero-title {
|
|
48
42
|
font-size: 2.5rem;
|
|
49
43
|
font-weight: 700;
|
|
44
|
+
margin-bottom: 1.5rem;
|
|
50
45
|
background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
|
|
51
46
|
-webkit-background-clip: text;
|
|
52
47
|
-webkit-text-fill-color: transparent;
|
|
53
48
|
background-clip: text;
|
|
54
49
|
}
|
|
55
50
|
|
|
51
|
+
.hero-description {
|
|
52
|
+
margin-bottom: 1.5rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.hero-cta {
|
|
56
|
+
margin-top: 0.75rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
56
59
|
.button-primary {
|
|
60
|
+
display: inline-block;
|
|
61
|
+
padding: 12px 24px;
|
|
57
62
|
border-radius: 4px;
|
|
58
63
|
background: #146ef5;
|
|
59
64
|
color: #ffffff;
|
|
65
|
+
text-decoration: none;
|
|
60
66
|
box-shadow: 0px 0.5px 1px rgba(0, 0, 0, 0.25), inset 0px 29px 23px -16px rgba(255, 255, 255, 0.04), inset 0px 0.5px 0.5px rgba(255, 255, 255, 0.2);
|
|
61
67
|
}
|
|
62
68
|
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
"cloud": {
|
|
3
3
|
"framework": "astro"
|
|
4
4
|
},
|
|
5
|
-
"devlink": {
|
|
6
|
-
"rootDir": "./
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
"devlink-export": {
|
|
6
|
+
"rootDir": "./webflow",
|
|
7
|
+
"components": ".*",
|
|
8
|
+
"componentGroups": ".*",
|
|
9
|
+
"ts": false,
|
|
10
|
+
"cssScopes": true,
|
|
11
|
+
"relativeHrefRoot": "/"
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -2,7 +2,21 @@ This is a [Next.js](https://nextjs.org) project bootstrapped with [`webflow clou
|
|
|
2
2
|
|
|
3
3
|
## Getting Started
|
|
4
4
|
|
|
5
|
-
First,
|
|
5
|
+
First, install dependencies:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Then, export your Webflow components:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
webflow devlink export
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This will create the `src/webflow/` directory with your Webflow components and styles.
|
|
18
|
+
|
|
19
|
+
Finally, run the development server:
|
|
6
20
|
|
|
7
21
|
```bash
|
|
8
22
|
npm run dev
|
|
@@ -12,4 +26,22 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
|
|
|
12
26
|
|
|
13
27
|
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
## Webflow Components
|
|
30
|
+
|
|
31
|
+
Your Webflow components are exported to `src/webflow/`. To update them when you make changes in Webflow:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
webflow devlink export
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Learn more about [Webflow DevLink](https://developers.webflow.com/data/docs/devlink-overview).
|
|
38
|
+
|
|
39
|
+
## Deployment
|
|
40
|
+
|
|
41
|
+
Deploy your app by running:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
webflow cloud deploy
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Learn more about [Webflow Cloud deployment](https://developers.webflow.com/webflow-cloud/environment).
|
|
@@ -11,7 +11,12 @@ const compat = new FlatCompat({
|
|
|
11
11
|
|
|
12
12
|
const eslintConfig = [
|
|
13
13
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
|
14
|
-
{
|
|
14
|
+
{
|
|
15
|
+
ignores: [
|
|
16
|
+
"**/webflow/**",
|
|
17
|
+
"**/webflow-*/**",
|
|
18
|
+
],
|
|
19
|
+
},
|
|
15
20
|
];
|
|
16
21
|
|
|
17
22
|
export default eslintConfig;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@layer properties, theme, base, webflow, components, utilities;
|
|
3
3
|
|
|
4
4
|
/* Webflow global styles are imported in the 'webflow' layer */
|
|
5
|
-
@import "../
|
|
5
|
+
@import "../webflow/css/global.css" layer(webflow);
|
|
6
6
|
@import "tailwindcss";
|
|
7
7
|
|
|
8
8
|
:root {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import { Geist, Geist_Mono, Inter } from "next/font/google";
|
|
3
3
|
import "./globals.css";
|
|
4
|
-
import { DevLinkProvider } from "@/
|
|
4
|
+
import { DevLinkProvider } from "@/webflow/DevLinkProvider";
|
|
5
5
|
|
|
6
6
|
const inter = Inter({
|
|
7
7
|
subsets: ["latin"],
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.hero-section {
|
|
2
|
+
min-height: 100vh;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.hero-content {
|
|
9
|
+
text-align: center;
|
|
10
|
+
max-width: 600px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.hero-title {
|
|
15
|
+
font-size: 2.5rem;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
margin-bottom: 1.5rem;
|
|
18
|
+
background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
|
|
19
|
+
-webkit-background-clip: text;
|
|
20
|
+
-webkit-text-fill-color: transparent;
|
|
21
|
+
background-clip: text;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.hero-description {
|
|
25
|
+
margin-bottom: 1.5rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hero-cta {
|
|
29
|
+
margin-top: 0.75rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.button-primary {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
padding: 12px 24px;
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
background: #146ef5;
|
|
37
|
+
color: #ffffff;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
box-shadow: 0px 0.5px 1px rgba(0, 0, 0, 0.25), inset 0px 29px 23px -16px rgba(255, 255, 255, 0.04), inset 0px 0.5px 0.5px rgba(255, 255, 255, 0.2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.button-primary:hover {
|
|
43
|
+
background: #2c80fd;
|
|
44
|
+
color: #ffffff;
|
|
45
|
+
}
|
|
@@ -1,64 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import "./page.css";
|
|
4
|
+
|
|
5
|
+
// Import DevLink components from "@/webflow/*"
|
|
6
|
+
// import { ComponentName } from "@/webflow/ComponentName";
|
|
4
7
|
|
|
5
8
|
export default function Home() {
|
|
6
9
|
return (
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
tag="div"
|
|
19
|
-
className="hero-split"
|
|
20
|
-
style={{
|
|
21
|
-
textAlign: "center",
|
|
22
|
-
maxWidth: "600px",
|
|
23
|
-
margin: "0 auto",
|
|
24
|
-
}}
|
|
25
|
-
>
|
|
26
|
-
<h1
|
|
27
|
-
className="margin-bottom-24px"
|
|
28
|
-
style={{
|
|
29
|
-
fontSize: "2.5rem",
|
|
30
|
-
fontWeight: 700,
|
|
31
|
-
background: "linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%)",
|
|
32
|
-
WebkitBackgroundClip: "text",
|
|
33
|
-
WebkitTextFillColor: "transparent",
|
|
34
|
-
backgroundClip: "text",
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
Welcome to Webflow Cloud
|
|
38
|
-
</h1>
|
|
39
|
-
<Block tag="p" className="margin-bottom-24px">
|
|
40
|
-
This is a simple test using Basic components with enhanced styling.
|
|
41
|
-
</Block>
|
|
42
|
-
<div style={{ marginTop: "12px" }}>
|
|
43
|
-
<Link
|
|
44
|
-
button={true}
|
|
45
|
-
options={{
|
|
46
|
-
href: "https://developers.webflow.com/webflow-cloud/getting-started",
|
|
47
|
-
}}
|
|
10
|
+
<section className="hero-section">
|
|
11
|
+
<div className="container">
|
|
12
|
+
<div className="hero-content">
|
|
13
|
+
<h1 className="hero-title">Welcome to Webflow Cloud</h1>
|
|
14
|
+
<p className="hero-description">
|
|
15
|
+
Your Next.js project is ready. Start building and sync your Webflow
|
|
16
|
+
components and design system.
|
|
17
|
+
</p>
|
|
18
|
+
<div className="hero-cta">
|
|
19
|
+
<a
|
|
20
|
+
href="https://developers.webflow.com/data-clients/docs/getting-started"
|
|
48
21
|
className="button-primary"
|
|
49
|
-
style={{
|
|
50
|
-
borderRadius: "4px",
|
|
51
|
-
background: "#146ef5",
|
|
52
|
-
color: "#ffffff",
|
|
53
|
-
boxShadow:
|
|
54
|
-
"0px 0.5px 1px rgba(0, 0, 0, 0.25), inset 0px 29px 23px -16px rgba(255, 255, 255, 0.04), inset 0px 0.5px 0.5px rgba(255, 255, 255, 0.2)",
|
|
55
|
-
}}
|
|
56
22
|
>
|
|
57
23
|
Get Started
|
|
58
|
-
</
|
|
24
|
+
</a>
|
|
59
25
|
</div>
|
|
60
|
-
</
|
|
61
|
-
</
|
|
62
|
-
</
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</section>
|
|
63
29
|
);
|
|
64
30
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Webflow component and CSS type declarations
|
|
2
|
+
// These modules will be created by 'webflow devlink export'
|
|
3
|
+
|
|
4
|
+
// CSS module declarations
|
|
5
|
+
declare module "*.css" {
|
|
6
|
+
const content: Record<string, string>;
|
|
7
|
+
export default content;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Webflow component modules
|
|
11
|
+
declare module "@/webflow/webflow_modules/*" {
|
|
12
|
+
const Component: any;
|
|
13
|
+
export default Component;
|
|
14
|
+
}
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
"cloud": {
|
|
3
3
|
"framework": "nextjs"
|
|
4
4
|
},
|
|
5
|
-
"devlink": {
|
|
6
|
-
"rootDir": "./src/
|
|
7
|
-
"
|
|
5
|
+
"devlink-export": {
|
|
6
|
+
"rootDir": "./src/webflow",
|
|
7
|
+
"components": ".*",
|
|
8
|
+
"componentGroups": ".*",
|
|
9
|
+
"ts": true,
|
|
10
|
+
"cssScopes": true,
|
|
11
|
+
"relativeHrefRoot": "/"
|
|
8
12
|
}
|
|
9
13
|
}
|