Skip to content

Commit 5cb32a2

Browse files
update C3 instructions for Pages projects
It is now required to pass `--platform=pages` to create a Pages project.
1 parent 7bc1686 commit 5cb32a2

File tree

4 files changed

+16
-28
lines changed

4 files changed

+16
-28
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,6 @@
131131
},
132132
"volta": {
133133
"node": "22.9.0"
134-
}
134+
},
135+
"packageManager": "[email protected]+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca"
135136
}

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

+6-20
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

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

-7
This file was deleted.

0 commit comments

Comments
 (0)