Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

penalosa
Copy link
Contributor

No description provided.

@penalosa penalosa requested a review from a team as a code owner November 15, 2024 22:52
Copy link

changeset-bot bot commented Nov 15, 2024

⚠️ No Changeset found

Latest commit: 364f1f9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 15, 2024

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 with this latest build directly:

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.


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241106.0
workerd 1.20241106.1 1.20241106.1
workerd --version 1.20241106.1 2024-11-06

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link
Contributor

@emily-shen emily-shen left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### `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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### `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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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]`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### `wrangler pages dev [directory]`
#### `wrangler pages dev [directory]`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

3 participants