-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update and improve the Cloudflare adapter getting started guide #45
update and improve the Cloudflare adapter getting started guide #45
Conversation
ee471d3
to
334929f
Compare
|
||
You should add `.open-next` to your `.gitignore` file to prevent the build output from being committed to your repository. | ||
|
||
#### Uninstall `@cloudflare/next-on-pages` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to clean things up a bit here
We have both a Remove '@cloudflare/next-on-pages' (if necessary)
and a Uninstall '@cloudflare/next-on-pages'
section, this seems pretty confusing to me, also the hierarchy is a bit out of whack I think (for example, Add '.open-next' to '.gitignore'
is under Remove '@cloudflare/next-on-pages' (if necessary)
, that doesn't seem correct to me)
|
||
```diff | ||
"scripts": { | ||
- "pages:build": "npx @cloudflare/next-on-pages", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are the scripts the C3 generates for users, but people can create their apps manually and not via C3 or update the name of such scripts, so I think that maybe it makes sense to just be generic here and say to remove any reference to the next-on-pages package and be done with it
@@ -23,43 +23,66 @@ Use the template from `flarelabs-net/workers-next` as indicated above to use 0.3 | |||
First, install [@opennextjs/cloudflare](https://www.npmjs.com/package/@opennextjs/cloudflare): | |||
|
|||
```sh | |||
npm install --save-dev @opennextjs/cloudflare |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added @latest
to be consistent with wrangler
below (I'm just making this change for consistency, I don't have a strong preference here, we can or not have @latest
, whatever you prefer)
|
||
Install the [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/) as a devDependency: | ||
|
||
```npm | ||
npm install -D wrangler@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated -D
to --save-dev
to be consistent with @opennextjs/cloudflare
above (I'm just making this change for consistency, I don't have a strong preference here, we can go with either version)
d94738f
to
8a36931
Compare
8a36931
to
96b771d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Warning
This PR should be merged only after
@opennextjs/[email protected]
is released (release PR)I've updated the getting started guide here mainly for calling out that developers don't necessarily need to create the
open-next.config.ts
andwrangler.toml
files themselves since now that can be done by the Cloudflare adapter.As I was updating the guide I've found other few spots that I think can be simplified/improved