@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
|
@@ -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
|
}
|