wrangler 0.0.0-fa42d7ca → 0.0.0-fa5a8fc30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,44 +8,38 @@
8
8
 
9
9
  `wrangler` is a command line tool for building [Cloudflare Workers](https://workers.cloudflare.com/).
10
10
 
11
+ > [!WARNING]
12
+ >
13
+ > Wrangler v2 is **only receiving critical security updates.** We recommend you [migrate to Wrangler v3](https://developers.cloudflare.com/workers/wrangler/migration/update-v2-to-v3/) if you can.
14
+
11
15
  ## Quick Start
12
16
 
17
+ To get started quickly with a Hello World worker, run the command below:
18
+
13
19
  ```bash
14
- # Make a javascript file
15
- echo "export default { fetch() { return new Response('hello world') } }" > index.js
16
- # try it out
17
- npx wrangler dev index.js
18
- # and then deploy it
19
- npx wrangler deploy index.js --name my-worker
20
- # visit https://my-worker.<your workers subdomain>.workers.dev
20
+ npx wrangler init my-worker -y
21
21
  ```
22
22
 
23
- ## Create a Project
23
+ For more info, visit our [Getting Started](https://developers.cloudflare.com/workers/get-started/guide/) guide.
24
24
 
25
- ```bash
26
- # Generate a new project
27
- npx wrangler init my-worker --no-delegate-c3
28
- # try it out
29
- cd my-worker && npm run start
30
- # and then deploy it
31
- npm run deploy
32
- ```
25
+ ## Documentation
33
26
 
34
- ## Installation:
27
+ For the latest Wrangler documentation, [click here](https://developers.cloudflare.com/workers/wrangler/).
35
28
 
36
- ```bash
37
- $ npm install wrangler --save-dev
38
- ```
29
+ To read more about Workers in general:
39
30
 
40
- ## Configuration:
31
+ - [Getting Started](https://developers.cloudflare.com/workers/get-started/guide/)
32
+ - [How Workers works](https://developers.cloudflare.com/workers/reference/how-workers-works/)
33
+ - [Observability](https://developers.cloudflare.com/workers/observability/)
34
+ - [Platform](https://developers.cloudflare.com/workers/platform/)
41
35
 
42
- 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.
36
+ ## Configuration
43
37
 
44
- Example:
38
+ Wrangler is configured via a `wrangler.toml` or `wrangler.json` file in the project root. An example configuration generated by `npx wrangler init` or `npx create cloudflare` is as follows:
45
39
 
46
40
  ```toml
47
41
  name = "my-worker"
48
- main = "./src/index.ts" # init w/ TypeScript
42
+ main = "./src/index.ts"
49
43
  compatibility_date = "YYYY-MM-DD"
50
44
  ```
51
45
 
@@ -53,30 +47,24 @@ For more detailed information about configuration, refer to the [documentation](
53
47
 
54
48
  ## Commands
55
49
 
56
- ### `wrangler init [name]`
57
-
58
- Creates a Worker project. For details on configuration keys and values, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/commands/#init).
50
+ ### Workers
59
51
 
60
- ### `wrangler dev`
52
+ #### `wrangler dev`
61
53
 
62
54
  Start a local development server, with live reloading and devtools.
63
55
 
64
- ### `wrangler deploy`
56
+ #### `wrangler deploy`
65
57
 
66
- Publish the given script to the worldwide Cloudflare network.
58
+ Publish the given script to Cloudflare's global network.
67
59
 
68
60
  For more commands and options, refer to the [documentation](https://developers.cloudflare.com/workers/wrangler/commands/).
69
61
 
70
- ## Pages
62
+ ### Pages
71
63
 
72
- ### `wrangler pages dev [directory] [-- command]`
64
+ #### `wrangler pages dev [directory]`
73
65
 
74
- Either serves a static build asset directory, or proxies itself in front of a command.
66
+ Serves a static build asset directory.
75
67
 
76
68
  Builds and runs functions from a `./functions` directory or uses a `_worker.js` file inside the static build asset directory.
77
69
 
78
70
  For more commands and options, refer to the [documentation](https://developers.cloudflare.com/pages/platform/functions#develop-and-preview-locally) or run `wrangler pages dev --help`.
79
-
80
- ## Documentation
81
-
82
- For the latest Wrangler documentation, [click here](https://developers.cloudflare.com/workers/wrangler/).