Skip to content

Commit 9421887

Browse files
committed
Add global flags to wrangler commands
1 parent 6e99f04 commit 9421887

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,7 @@ Wrangler offers a number of commands to manage your Cloudflare Workers.
4646

4747
The following global flags work on every command, with some exceptions for `pages` commands.
4848

49-
- `--help` <Type text="boolean" />
50-
- Show help.
51-
- `--version` <Type text="boolean" />
52-
- Show version number.
53-
- `--config` <Type text="string" /> (not supported by Pages)
54-
- Path to `.toml` configuration file.
55-
- `--experimental-json-config` <Type text="boolean" /> (not supported by Pages)
56-
- ⚠️ This is an experimental command. Read configuration from a `wrangler.json` file, instead of `wrangler.toml`. `wrangler.json` is a [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments) file.
49+
<Render file="wrangler-commands/global-flags" product="workers" />
5750

5851
:::
5952

@@ -137,6 +130,10 @@ wrangler docs [<COMMAND>]
137130
- `COMMAND` <Type text="string" /> <MetaInfo text="optional" />
138131
- The Wrangler command you want to learn more about. This opens your default browser to the section of the documentation that describes the command.
139132

133+
The following global flags can also be used:
134+
135+
<Render file="wrangler-commands/global-flags" product="workers" />
136+
140137
## `init`
141138

142139
:::note
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
{}
3+
---
4+
5+
- `--help` <Type text="boolean" />
6+
- Show help.
7+
- `--version` <Type text="boolean" />
8+
- Show version number.
9+
- `--config` <Type text="string" /> (not supported by Pages)
10+
- Path to `.toml` configuration file.
11+
- `--experimental-json-config` <Type text="boolean" /> (not supported by Pages)
12+
- ⚠️ This is an experimental command. Read configuration from a `wrangler.json` file, instead of `wrangler.toml`. `wrangler.json` is a [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments) file.

0 commit comments

Comments
 (0)