This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c03e442
commit f8ad9d0
Showing
8 changed files
with
191 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "wrangler" | ||
version = "1.6.0" | ||
version = "1.7.0" | ||
authors = ["Ashley Williams <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT/Apache-2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
[](https://crates.io/crates/wrangler) | ||
[](https://dev.azure.com/ashleygwilliams/wrangler/_build/latest?definitionId=1&branchName=master) | ||
[](https://github.com/cloudflare/wrangler/actions) | ||
|
||
`wrangler` is a CLI tool designed for folks who are interested in using [Cloudflare Workers](https://workers.cloudflare.com/). | ||
|
||
|
@@ -47,83 +48,83 @@ $ wrangler publish | |
|
||
### 👯 `generate` | ||
|
||
Scaffold a project, including boilerplate code for a Rust library and a Cloudflare Worker. | ||
Scaffold a project, including boilerplate code for a Rust library and a Cloudflare Worker. | ||
|
||
```bash | ||
wrangler generate <name> <template> --type=["webpack", "javascript", "rust"] | ||
``` | ||
```bash | ||
wrangler generate <name> <template> --type=["webpack", "javascript", "rust"] | ||
``` | ||
|
||
All of the arguments and flags to this command are optional: | ||
All of the arguments and flags to this command are optional: | ||
|
||
- `name`: defaults to `worker` | ||
- `template`: defaults to the [`https://github.com/cloudflare/worker-template`](https://github.com/cloudflare/worker-template) | ||
- `type`: defaults to ["webpack"](https://developers.cloudflare.com/workers/tooling/wrangler/webpack) | ||
- `name`: defaults to `worker` | ||
- `template`: defaults to the [`https://github.com/cloudflare/worker-template`](https://github.com/cloudflare/worker-template) | ||
- `type`: defaults to ["webpack"](https://developers.cloudflare.com/workers/tooling/wrangler/webpack) | ||
|
||
### 📥 `init` | ||
|
||
Creates a skeleton `wrangler.toml` in an existing directory. This can be used as an alternative to `generate` if you prefer to clone a repository yourself. | ||
Creates a skeleton `wrangler.toml` in an existing directory. This can be used as an alternative to `generate` if you prefer to clone a repository yourself. | ||
|
||
```bash | ||
wrangler init <name> --type=["webpack", "javascript", "rust"] | ||
``` | ||
```bash | ||
wrangler init <name> --type=["webpack", "javascript", "rust"] | ||
``` | ||
|
||
All of the arguments and flags to this command are optional: | ||
All of the arguments and flags to this command are optional: | ||
|
||
- `name`: defaults to the name of your working directory | ||
- `type`: defaults to ["webpack"](https://developers.cloudflare.com/workers/tooling/wrangler/webpack). | ||
- `name`: defaults to the name of your working directory | ||
- `type`: defaults to ["webpack"](https://developers.cloudflare.com/workers/tooling/wrangler/webpack). | ||
|
||
### 🦀⚙️ `build` | ||
|
||
Build your project. This command looks at your `wrangler.toml` file and runs the build steps associated | ||
with the `"type"` declared there. | ||
Build your project. This command looks at your `wrangler.toml` file and runs the build steps associated | ||
with the `"type"` declared there. | ||
|
||
Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments). | ||
Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments). | ||
|
||
### 🔧 `config` | ||
|
||
Configure your global Cloudflare user. This is an interactive command that will prompt you for your API token: | ||
Configure your global Cloudflare user. This is an interactive command that will prompt you for your API token: | ||
|
||
```bash | ||
wrangler config | ||
Enter API token: | ||
superlongapitoken | ||
``` | ||
```bash | ||
wrangler config | ||
Enter API token: | ||
superlongapitoken | ||
``` | ||
|
||
You can also provide your email and global API key (this is not recommended for security reasons): | ||
You can also provide your email and global API key (this is not recommended for security reasons): | ||
|
||
```bash | ||
wrangler config --api-key | ||
Enter email: | ||
[email protected] | ||
Enter global API key: | ||
superlongapikey | ||
``` | ||
```bash | ||
wrangler config --api-key | ||
Enter email: | ||
[email protected] | ||
Enter global API key: | ||
superlongapikey | ||
``` | ||
|
||
You can also [use environment variables](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/) to configure these values. | ||
You can also [use environment variables](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/) to configure these values. | ||
|
||
### ☁️ 🆙 `publish` | ||
|
||
Publish your Worker to Cloudflare. Several keys in your `wrangler.toml` determine whether you are publishing to a workers.dev subdomain or your own registered domain, proxied through Cloudflare. | ||
Publish your Worker to Cloudflare. Several keys in your `wrangler.toml` determine whether you are publishing to a workers.dev subdomain or your own registered domain, proxied through Cloudflare. | ||
|
||
Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments). | ||
Additionally, you can configure different [environments](https://developers.cloudflare.com/workers/tooling/wrangler/configuration/environments). | ||
|
||
You can also use environment variables to handle authentication when you publish a Worker. | ||
You can also use environment variables to handle authentication when you publish a Worker. | ||
|
||
```bash | ||
# e.g. | ||
CF_API_TOKEN=superlongtoken wrangler publish | ||
# where | ||
# $CF_API_TOKEN -> your Cloudflare API token | ||
```bash | ||
# e.g. | ||
CF_API_TOKEN=superlongtoken wrangler publish | ||
# where | ||
# $CF_API_TOKEN -> your Cloudflare API token | ||
|
||
CF_API_KEY=superlongapikey [email protected] wrangler publish | ||
# where | ||
# $CF_API_KEY -> your Cloudflare API key | ||
# $CF_EMAIL -> your Cloudflare account email | ||
``` | ||
CF_API_KEY=superlongapikey [email protected] wrangler publish | ||
# where | ||
# $CF_API_KEY -> your Cloudflare API key | ||
# $CF_EMAIL -> your Cloudflare account email | ||
``` | ||
|
||
### 🗂 `kv` | ||
|
||
Interact with your Workers KV store. This is actually a whole suite of subcommands. Read more about in [Wrangler KV Documentation](https://developers.cloudflare.com/workers/tooling/wrangler/kv_commands). | ||
Interact with your Workers KV store. This is actually a whole suite of subcommands. Read more about in [Wrangler KV Documentation](https://developers.cloudflare.com/workers/tooling/wrangler/kv_commands). | ||
|
||
## Additional Documentation | ||
|
||
|
@@ -134,6 +135,6 @@ All information regarding wrangler or Cloudflare Workers is located in the [Clou | |
- General documentation surrounding Workers development | ||
- All wrangler features such as Workers Sites and KV | ||
|
||
#### ✨Workers Sites | ||
## ✨Workers Sites | ||
|
||
To learn about deploying static assets using `wrangler`, see the [Workers Sites Quickstart](https://developers.cloudflare.com/workers/sites/). |
Oops, something went wrong.