-
Notifications
You must be signed in to change notification settings - Fork 724
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
Spruce up the Wrangler NPM README a tad #7271
base: main
Are you sure you want to change the base?
Conversation
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-wrangler-7271 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7271/npm-package-wrangler-7271 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-wrangler-7271 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-create-cloudflare-7271 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-cloudflare-kv-asset-handler-7271 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-miniflare-7271 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-cloudflare-pages-shared-7271 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-cloudflare-vitest-pool-workers-7271 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-cloudflare-workers-editor-shared-7271 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-cloudflare-workers-shared-7271 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11865535952/npm-package-cloudflare-workflows-shared-7271 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
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.
🌲 excellent sprucing
# and then deploy it | ||
npx wrangler deploy index.js --name my-worker | ||
# visit https://my-worker.<your workers subdomain>.workers.dev | ||
npx wrangler init my-worker |
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.
the instructions in https://developers.cloudflare.com/workers/get-started/guide/ use npm create cloudflare@latest -- my-first-worker
rather than wrangler init
. i'd suggest using the same command here as in the guide. is there a reason you went with init
?
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 was leaning towards wrangler init
because this is the README specifically for the Wrangler package, and it felt like introducing C3 at that stage might be overcomplicating? Happy to change though
@@ -14,73 +14,55 @@ | |||
|
|||
## Quick Start | |||
|
|||
To get started quickly with a new project, run the command below and follow the interactive instructions: |
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.
To get started quickly with a new project, run the command below and follow the interactive instructions: | |
To get started quickly with a new project, run the command below. You will be guided through interactive instructions. Select options following our [Getting Started](https://developers.cloudflare.com/workers/get-started/guide/) guide to set up your Hello World worker. |
|
||
Wrangler is configured via a `wrangler.toml` file in the project root. When utilizing the `wrangler init` command, a `wrangler.toml` file will be created for you. | ||
## Configuration: |
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.
## Configuration: | |
## Configuration |
|
||
Example: | ||
Wrangler is configured via a `wrangler.toml` file in the project root. `npx wrangler init` will generate a simple configuration file for you: |
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.
Wrangler is configured via a `wrangler.toml` file in the project root. `npx wrangler init` will generate a simple configuration file for you: | |
Wrangler is configured via a `wrangler.toml` file in the project root. An example configuration generated by `npx wrangler init` or `npx create cloudflare` is as follows: |
### `wrangler init [name]` | ||
|
||
Creates a Worker project. For details on configuration keys and values, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/commands/#init). | ||
|
||
### `wrangler dev` |
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.
### `wrangler dev` | |
### Workers | |
#### `wrangler dev` |
### `wrangler init [name]` | ||
|
||
Creates a Worker project. For details on configuration keys and values, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/commands/#init). | ||
|
||
### `wrangler dev` | ||
|
||
Start a local development server, with live reloading and devtools. | ||
|
||
### `wrangler deploy` |
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.
### `wrangler deploy` | |
#### `wrangler deploy` |
### `wrangler dev` | ||
|
||
Start a local development server, with live reloading and devtools. | ||
|
||
### `wrangler deploy` | ||
|
||
Publish the given script to the worldwide Cloudflare network. | ||
Publish the given script to Cloudflare's global network. | ||
|
||
For more commands and options, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/commands/). | ||
|
||
## 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.
## Pages | |
### Pages |
|
||
For more commands and options, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/commands/). | ||
|
||
## Pages | ||
|
||
### `wrangler pages dev [directory] [-- command]` | ||
### `wrangler pages dev [directory]` |
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.
### `wrangler pages dev [directory]` | |
#### `wrangler pages dev [directory]` |
No description provided.