Skip to content

Commit

Permalink
Fix package readme commands and add all the various pm variants (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored Sep 30, 2024
1 parent 953d0b1 commit 28d3ca1
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions packages/cloudflare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ You can use [`create-next-app`](https://nextjs.org/docs/pages/api-reference/cli/
- add the following `devDependencies` to the `package.json`:

```bash
npm add -D wrangler@latest @opennextjs/cloudflare
# or
pnpm add -D wrangler@latest @opennextjs/cloudflare
# or
yarn add -D wrangler@latest @opennextjs/cloudflare
# or
bun add -D wrangler@latest @opennextjs/cloudflare
```

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

```bash
npx wrangler kv namespace create NEXT_CACHE_WORKERS_KV
# or
pnpm wrangler kv namespace create NEXT_CACHE_WORKERS_KV
# or
yarn wrangler kv namespace create NEXT_CACHE_WORKERS_KV
# or
bun wrangler kv namespace create NEXT_CACHE_WORKERS_KV
```

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

```bash
pnpx cloudflare
npx cloudflare
# or
pnpm cloudflare
# or
yarn cloudflare
# or
bun cloudflare
```

- Preview the app in Wrangler

```bash
npx wrangler dev
# or
pnpm wrangler dev
# or
yarn wrangler dev
# or
bun wrangler dev
```

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

```bash
pnpx cloudflare
```

```bash
pnpm wrangler deploy
npx cloudflare && npx wrangler deploy
# or
pnpm cloudflare && pnpm wrangler deploy
# or
yarn cloudflare && yarn wrangler deploy
# or
bun cloudflare && bun wrangler deploy
```

0 comments on commit 28d3ca1

Please sign in to comment.