Skip to content

Commit de71097

Browse files
update C3 instructions for Pages projects (#22005)
It is now required to pass `--platform=pages` to create a Pages project.
1 parent f1f616e commit de71097

File tree

3 files changed

+14
-27
lines changed

3 files changed

+14
-27
lines changed

src/content/docs/pages/get-started/c3.mdx

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ Cloudflare provides a CLI command for creating new Workers and Pages projects
2525

2626
Open a terminal window and run:
2727

28-
<Render file="c3-run-command-no-directory" product="workers" />
28+
<Render file="c3-run-command-no-directory" product="pages" />
2929

3030
Running this command will prompt you to install the [`create-cloudflare`](https://www.npmjs.com/package/create-cloudflare) package, and then ask you questions about the type of application you wish to create.
3131

32+
:::note
33+
To create a Pages project you must now specify the `--platform=pages` arg, otherwise C3 will always create a Workers project.
34+
:::
35+
3236
## Web frameworks
3337

3438
If you choose the "Framework Starter" option, you will be prompted to choose a framework to use. The following frameworks are currently supported:
@@ -71,25 +75,7 @@ C3 collects any required input through a series of interactive prompts. You may
7175

7276
This is the full format of a C3 invocation alongside the possible CLI arguments:
7377

74-
<Tabs> <TabItem label="npm">
75-
76-
```sh
77-
npm create cloudflare@latest [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
78-
```
79-
80-
</TabItem> <TabItem label="yarn">
81-
82-
```sh
83-
yarn create cloudflare [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
84-
```
85-
86-
</TabItem> <TabItem label="pnpm">
87-
88-
```sh
89-
pnpm create cloudflare@latest [--] [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]
90-
```
91-
92-
</TabItem> </Tabs>
78+
<PackageManagers type="create" pkg="cloudflare@latest" args="--platform=pages [<DIRECTORY>] [OPTIONS] [-- <NESTED ARGS...>]"/>
9379

9480
- `DIRECTORY` <Type text="string" /> <MetaInfo text="optional" />
9581

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
{}
3+
---
4+
5+
import { PackageManagers } from "~/components";
6+
7+
<PackageManagers type="create" pkg="cloudflare@latest" args="--platform=pages"/>
8+

src/content/partials/workers/c3-run-command-no-directory.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)