Skip to content

Commit b7e52f4

Browse files
committed
C3 defaults to Workers
1 parent 78a1cc0 commit b7e52f4

27 files changed

+65
-153
lines changed

src/components/WorkerStarter.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ const link = `https://github.com/${repo}`;
1717
<p>{description}</p>
1818
<PackageManagers
1919
type="create"
20-
pkg="cloudflare@latest my-app"
21-
args=`--template ${repo}`
20+
pkg="cloudflare@latest"
21+
args=`my-app --template ${repo}`
2222
/>

src/content/docs/pages/framework-guides/deploy-a-docusaurus-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ To use `create-cloudflare` to create a new Docusaurus project, run the following
1515

1616
<PackageManagers
1717
type="create"
18-
pkg="cloudflare@latest my-docusaurus-app"
19-
args="--framework=docusaurus --platform=pages"
18+
pkg="cloudflare@latest"
19+
args="my-docusaurus-app --framework=docusaurus --platform=pages"
2020
/>
2121

2222
`create-cloudflare` will install additional dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and any necessary adapters, and ask you setup questions.

src/content/docs/pages/framework-guides/deploy-a-nuxt-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ The [`create-cloudflare` CLI (C3)](/pages/get-started/c3/) will configure your N
3434

3535
<PackageManagers
3636
type="create"
37-
pkg="cloudflare@latest my-nuxt-app"
38-
args="--framework=nuxt --platform=pages"
37+
pkg="cloudflare@latest"
38+
args="my-nuxt-app --framework=nuxt --platform=pages"
3939
/>
4040

4141
C3 will ask you a series of setup questions and create a new project with [`nuxi` (the official Nuxt CLI)](https://github.com/nuxt/cli). C3 will also install the necessary adapters along with the [Wrangler CLI](/workers/wrangler/install-and-update/#check-your-wrangler-version).

src/content/docs/pages/framework-guides/deploy-a-qwik-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new Qwik project, run the following comma
1717

1818
<PackageManagers
1919
type="create"
20-
pkg="cloudflare@latest my-qwik-app"
21-
args="--framework=qwik --platform=pages"
20+
pkg="cloudflare@latest"
21+
args="my-qwik-app --framework=qwik --platform=pages"
2222
/>
2323

2424
`create-cloudflare` will install additional dependencies, including the [Wrangler CLI](/workers/wrangler/install-and-update/#check-your-wrangler-version) and any necessary adapters, and ask you setup questions.

src/content/docs/pages/framework-guides/deploy-a-react-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new React project, run the following comm
1717

1818
<PackageManagers
1919
type="create"
20-
pkg="cloudflare@latest my-react-app"
21-
args="--framework=react --platform=pages"
20+
pkg="cloudflare@latest"
21+
args="my-react-app --framework=react --platform=pages"
2222
/>
2323

2424
`create-cloudflare` will install dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and the Cloudflare Pages adapter, and ask you setup questions.

src/content/docs/pages/framework-guides/deploy-a-remix-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Remix project, run the following comm
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-remix-app"
27-
args="--framework=remix --platform=pages"
26+
pkg="cloudflare@latest"
27+
args="my-remix-app --framework=remix --platform=pages"
2828
/>
2929

3030
`create-cloudflare` will install additional dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and any necessary adapters, and ask you setup questions.

src/content/docs/pages/framework-guides/deploy-a-svelte-kit-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ To use `create-cloudflare` to create a new Svelte project, run the following com
1818

1919
<PackageManagers
2020
type="create"
21-
pkg="cloudflare@latest my-svelte-app"
22-
args="--framework=svelte --platform=pages"
21+
pkg="cloudflare@latest"
22+
args="my-svelte-app --framework=svelte --platform=pages"
2323
/>
2424

2525
SvelteKit will prompt you for customization choices. For the template option, choose one of the application/project options. The remaining answers will not affect the rest of this guide. Choose the options that suit your project.

src/content/docs/pages/framework-guides/deploy-a-vue-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new Vue project, run the following comman
1717

1818
<PackageManagers
1919
type="create"
20-
pkg="cloudflare@latest my-vue-app "
21-
args="--framework=vue --platform=pages"
20+
pkg="cloudflare@latest"
21+
args="my-vue-app --framework=vue --platform=pages"
2222
/>
2323

2424
<Render file="tutorials-before-you-start" />

src/content/docs/pages/framework-guides/deploy-an-analog-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ The easiest way to create a new Analog project and deploy to Cloudflare Pages is
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-analog-app"
27-
args="--framework=analog --platform=pages"
26+
pkg="cloudflare@latest"
27+
args="my-analog-app --framework=analog --platform=pages"
2828
/>
2929

3030
C3 will walk you through the setup process and create a new project using `create-analog`, the official Analog creation tool. It will also install the necessary adapters along with the [Wrangler CLI](/workers/wrangler/install-and-update/#check-your-wrangler-version).

src/content/docs/pages/framework-guides/deploy-an-angular-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To use `create-cloudflare` to create a new Angular project, run the following co
1717

1818
<PackageManagers
1919
type="create"
20-
pkg="cloudflare@latest my-angular-app"
21-
args="--framework=angular --platform=pages"
20+
pkg="cloudflare@latest"
21+
args="my-angular-app --framework=angular --platform=pages"
2222
/>
2323

2424
`create-cloudflare` will install dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and the Cloudflare Pages adapter, and ask you setup questions.

src/content/docs/pages/framework-guides/deploy-an-astro-site.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ To use `create-cloudflare` to create a new Astro project, run the following comm
3030

3131
<PackageManagers
3232
type="create"
33-
pkg="cloudflare@latest my-astro-app"
34-
args="--framework=astro --platform=pages"
33+
pkg="cloudflare@latest"
34+
args="my-astro-app --framework=astro --platform=pages"
3535
/>
3636

3737
Astro will ask:

src/content/docs/pages/framework-guides/nextjs/ssr/get-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ To create a new Next.js app, pre-configured to run on Cloudflare, run:
2525

2626
<PackageManagers
2727
type="create"
28-
pkg="cloudflare@latest my-next-app"
29-
args="--framework=next --platform=pages"
28+
pkg="cloudflare@latest"
29+
args="my-next-app --framework=next --platform=pages"
3030
/>
3131

3232
For more guidance on developing your app, refer to [Bindings](/pages/framework-guides/nextjs/ssr/bindings/) or the [Next.js documentation](https://nextjs.org).

src/content/docs/workers-ai/guides/tutorials/build-a-voice-notes-app-with-auto-transcription.mdx

Lines changed: 5 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To continue, you will need:
4141

4242
Create a new Worker project using the `c3` CLI with the `nuxt` framework preset.
4343

44-
<PackageManagers type="create" pkg="cloudflare@latest" args={"voice-notes --framework=nuxt --experimental"} />
44+
<PackageManagers type="create" pkg="cloudflare@latest" args="voice-notes --framework=nuxt" />
4545

4646
### Install additional dependencies
4747

@@ -156,29 +156,7 @@ Before uploading the audio recordings to `R2`, you need to create a bucket first
156156

157157
Create an `R2` bucket.
158158

159-
<Tabs>
160-
<TabItem label="npm" icon="seti:npm">
161-
162-
```sh
163-
npx wrangler r2 bucket create <BUCKET_NAME>
164-
```
165-
166-
</TabItem>
167-
<TabItem label="yarn" icon="seti:yarn">
168-
169-
```sh
170-
yarn dlx wrangler r2 bucket create <BUCKET_NAME>
171-
```
172-
173-
</TabItem>
174-
<TabItem label="pnpm" icon="pnpm">
175-
176-
```sh
177-
pnpm dlx wrangler r2 bucket create <BUCKET_NAME>
178-
```
179-
180-
</TabItem>
181-
</Tabs>
159+
<PackageManagers type="exec" pkg="wrangler" args="r2 bucket create <BUCKET_NAME>" />
182160

183161
Add the storage binding to your Wrangler file.
184162

@@ -229,29 +207,7 @@ Before creating the endpoint, you will need to perform steps similar to those fo
229207

230208
Create a `D1` database.
231209

232-
<Tabs>
233-
<TabItem label="npm" icon="seti:npm">
234-
235-
```sh
236-
npx wrangler d1 create <DB_NAME>
237-
```
238-
239-
</TabItem>
240-
<TabItem label="yarn" icon="seti:yarn">
241-
242-
```sh
243-
yarn dlx wrangler d1 create <DB_NAME>
244-
```
245-
246-
</TabItem>
247-
<TabItem label="pnpm" icon="pnpm">
248-
249-
```sh
250-
pnpm dlx wrangler d1 create <DB_NAME>
251-
```
252-
253-
</TabItem>
254-
</Tabs>
210+
<PackageManagers type="exec" pkg="wrangler" args="d1 create <DB_NAME>" />
255211

256212
Add the D1 bindings to the Wrangler file. You can get the `DB_ID` from the output of the `d1 create` command.
257213

@@ -266,29 +222,7 @@ As before, rerun the `cf-typegen` command to generate the types.
266222

267223
Next, create a DB migration.
268224

269-
<Tabs>
270-
<TabItem label="npm" icon="seti:npm">
271-
272-
```sh
273-
npx wrangler d1 migrations create <DB_NAME> "create notes table"
274-
```
275-
276-
</TabItem>
277-
<TabItem label="yarn" icon="seti:yarn">
278-
279-
```sh
280-
yarn dlx wrangler d1 migrations create <DB_NAME> "create notes table"
281-
```
282-
283-
</TabItem>
284-
<TabItem label="pnpm" icon="pnpm">
285-
286-
```sh
287-
pnpm dlx wrangler d1 migrations create <DB_NAME> "create notes table"
288-
```
289-
290-
</TabItem>
291-
</Tabs>
225+
<PackageManagers type="exec" pkg="wrangler" args={`d1 migrations create <DB_NAME> "create notes table"`} />
292226

293227
This will create a new `migrations` folder in the project's root directory, and add an empty `0001_create_notes_table.sql` file to it. Replace the contents of this file with the code below.
294228

@@ -304,29 +238,7 @@ CREATE TABLE IF NOT EXISTS notes (
304238

305239
And then apply this migration to create the `notes` table.
306240

307-
<Tabs>
308-
<TabItem label="npm" icon="seti:npm">
309-
310-
```sh
311-
npx wrangler d1 migrations apply <DB_NAME>
312-
```
313-
314-
</TabItem>
315-
<TabItem label="yarn" icon="seti:yarn">
316-
317-
```sh
318-
yarn dlx wrangler d1 migrations apply <DB_NAME>
319-
```
320-
321-
</TabItem>
322-
<TabItem label="pnpm" icon="pnpm">
323-
324-
```sh
325-
pnpm dlx wrangler d1 migrations apply <DB_NAME>
326-
```
327-
328-
</TabItem>
329-
</Tabs>
241+
<PackageManagers type="exec" pkg="wrangler" args="d1 migrations apply <DB_NAME>" />
330242

331243
:::note
332244
The above command will create the notes table locally. To apply the migration on your remote production database, use the `--remote` flag.

src/content/docs/workers/frameworks/framework-guides/angular.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Angular project with Workers Assets,
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-angular-app"
27-
args={"--framework=angular --platform=workers"}
26+
pkg="cloudflare@latest"
27+
args="my-angular-app --framework=angular"
2828
/>
2929

3030
After setting up your project, change your directory by running the following command:

src/content/docs/workers/frameworks/framework-guides/astro.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import {
2222

2323
<PackageManagers
2424
type="create"
25-
pkg="cloudflare@latest my-astro-app"
26-
args="--framework=astro --platform=workers"
25+
pkg="cloudflare@latest"
26+
args="my-astro-app --framework=astro"
2727
/>
2828

2929
---
@@ -47,7 +47,7 @@ Astro is also framework-agnostic, and supports every major UI framework, includi
4747
<PackageManagers
4848
type="create"
4949
pkg="cloudflare@latest"
50-
args="my-astro-app -- --framework=astro --platform=workers"
50+
args="my-astro-app --framework=astro"
5151
/>
5252

5353
<Details header="What's happening behind the scenes?">

src/content/docs/workers/frameworks/framework-guides/docusaurus.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Docusaurus project with Workers Asset
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-docusaurus-app"
27-
args={"--framework=docusaurus --platform=workers"}
26+
pkg="cloudflare@latest"
27+
args="my-docusaurus-app --framework=docusaurus"
2828
/>
2929

3030
After setting up your project, change your directory by running the following command:

src/content/docs/workers/frameworks/framework-guides/gatsby.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Gatsby project with Workers Assets, r
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-gatsby-app"
27-
args={"--framework=gatsby --platform=workers"}
26+
pkg="cloudflare@latest"
27+
args="my-gatsby-app --framework=gatsby"
2828
/>
2929

3030
After setting up your project, change your directory by running the following command:

src/content/docs/workers/frameworks/framework-guides/hono.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import {
2020

2121
<PackageManagers
2222
type="create"
23-
pkg="cloudflare@latest my-hono-app"
24-
args="--template=cloudflare/templates/vite-react-template"
23+
pkg="cloudflare@latest"
24+
args="my-hono-app --template=cloudflare/templates/vite-react-template"
2525
/>
2626
---
2727

@@ -41,8 +41,8 @@ With Workers Assets, you can easily combine a Hono API running on Workers with a
4141

4242
<PackageManagers
4343
type="create"
44-
pkg="cloudflare@latest my-hono-app"
45-
args="--template=cloudflare/templates/vite-react-template"
44+
pkg="cloudflare@latest"
45+
args="my-hono-app --template=cloudflare/templates/vite-react-template"
4646
/>
4747
<Details header="How is this project set up?">
4848
Below is a simplified file tree of the project.

src/content/docs/workers/frameworks/framework-guides/nextjs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The OpenNext adapter is in currently in beta.
2424

2525
<PackageManagers
2626
type="create"
27-
pkg="cloudflare@latest my-next-app"
28-
args={"--framework=next --platform=workers"}
27+
pkg="cloudflare@latest"
28+
args="my-next-app --framework=next"
2929
/>
3030

3131
This is a simple getting started guide. For detailed documentation on how the to use the Cloudflare OpenNext adapter, visit the [OpenNext website](https://opennext.js.org/cloudflare).
@@ -46,8 +46,8 @@ You can deploy your Next.js app to Cloudflare Workers using the OpenNext adaptor
4646

4747
<PackageManagers
4848
type="create"
49-
pkg="cloudflare@latest my-next-app"
50-
args={"--framework=next --platform=workers"}
49+
pkg="cloudflare@latest"
50+
args="my-next-app --framework=next"
5151
/>
5252

5353
<Details header="What's happening behind the scenes?">

src/content/docs/workers/frameworks/framework-guides/nuxt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Nuxt project with Workers Assets, run
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-nuxt-app"
27-
args={"--framework=nuxt --platform=workers"}
26+
pkg="cloudflare@latest"
27+
args="my-nuxt-app --framework=nuxt"
2828
/>
2929

3030
After setting up your project, change your directory by running the following command:

src/content/docs/workers/frameworks/framework-guides/qwik.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To use `create-cloudflare` to create a new Qwik project with Workers Assets, run
2323

2424
<PackageManagers
2525
type="create"
26-
pkg="cloudflare@latest my-qwik-app"
27-
args={"--framework=qwik --platform=workers"}
26+
pkg="cloudflare@latest"
27+
args="my-qwik-app --framework=qwik"
2828
/>
2929

3030
After setting up your project, change your directory by running the following command:

0 commit comments

Comments
 (0)