Skip to content

Commit 28d3ca1

Browse files
Fix package readme commands and add all the various pm variants (#48)
1 parent 953d0b1 commit 28d3ca1

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

packages/cloudflare/README.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ You can use [`create-next-app`](https://nextjs.org/docs/pages/api-reference/cli/
1313
- add the following `devDependencies` to the `package.json`:
1414

1515
```bash
16+
npm add -D wrangler@latest @opennextjs/cloudflare
17+
# or
1618
pnpm add -D wrangler@latest @opennextjs/cloudflare
19+
# or
20+
yarn add -D wrangler@latest @opennextjs/cloudflare
21+
# or
22+
bun add -D wrangler@latest @opennextjs/cloudflare
1723
```
1824

1925
- add a `wrangler.toml` at the root of your project
@@ -36,6 +42,12 @@ You can enable Incremental Static Regeneration ([ISR](https://nextjs.org/docs/ap
3642

3743
```bash
3844
npx wrangler kv namespace create NEXT_CACHE_WORKERS_KV
45+
# or
46+
pnpm wrangler kv namespace create NEXT_CACHE_WORKERS_KV
47+
# or
48+
yarn wrangler kv namespace create NEXT_CACHE_WORKERS_KV
49+
# or
50+
bun wrangler kv namespace create NEXT_CACHE_WORKERS_KV
3951
```
4052

4153
- Paste the snippet to your `wrangler.toml`:
@@ -60,13 +72,25 @@ Run the following commands to preview the production build of your application l
6072
- build the app and adapt it for Cloudflare
6173

6274
```bash
63-
pnpx cloudflare
75+
npx cloudflare
76+
# or
77+
pnpm cloudflare
78+
# or
79+
yarn cloudflare
80+
# or
81+
bun cloudflare
6482
```
6583

6684
- Preview the app in Wrangler
6785

6886
```bash
87+
npx wrangler dev
88+
# or
6989
pnpm wrangler dev
90+
# or
91+
yarn wrangler dev
92+
# or
93+
bun wrangler dev
7094
```
7195

7296
## Deploy your app
@@ -76,9 +100,11 @@ Deploy your application to production with the following:
76100
- build the app and adapt it for Cloudflare
77101

78102
```bash
79-
pnpx cloudflare
80-
```
81-
82-
```bash
83-
pnpm wrangler deploy
103+
npx cloudflare && npx wrangler deploy
104+
# or
105+
pnpm cloudflare && pnpm wrangler deploy
106+
# or
107+
yarn cloudflare && yarn wrangler deploy
108+
# or
109+
bun cloudflare && bun wrangler deploy
84110
```

0 commit comments

Comments
 (0)