From f5f7dda582006fb72b492d8927e1440276c01265 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Mon, 17 Feb 2025 23:28:28 +0000 Subject: [PATCH 1/3] In the config doc mention that there are toml<->json online converters --- src/content/docs/workers/wrangler/configuration.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index 0b01ec1f274fab..6d535af40a8af5 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -16,7 +16,14 @@ Wrangler optionally uses a configuration file to customize the development and d :::note -As of Wrangler v3.91.0 Wrangler supports both JSON (`wrangler.json` or `wrangler.jsonc`) and TOML (`wrangler.toml`) for its configuration file. Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, except that the syntax is `JSON` rather than `TOML`. Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. +As of Wrangler v3.91.0 Wrangler supports both JSON (`wrangler.json` or `wrangler.jsonc`) and TOML (`wrangler.toml`) for its configuration file. + +Prior to that version, only `wrangler.toml` was supported. + +The format of Wrangler's configuration file is exactly the same across both languages, only the syntax differs. +You can also easily switch between the two, there are many online converters for that such as: [toml2jsonConverter](https://esakat.github.io/toml2jsonConverter). + +Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. ::: From 25807d8cf096af2e27ee49d3a62484584c56170b Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Wed, 30 Apr 2025 15:08:13 +0100 Subject: [PATCH 2/3] Update src/content/docs/workers/wrangler/configuration.mdx Co-authored-by: ToriLindsay --- src/content/docs/workers/wrangler/configuration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index 6d535af40a8af5..e123e0dadec9e8 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -23,7 +23,7 @@ Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, only the syntax differs. You can also easily switch between the two, there are many online converters for that such as: [toml2jsonConverter](https://esakat.github.io/toml2jsonConverter). -Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. +Throughout this page and the rest of Cloudflare's documentation, configuration snippets are provided as both JSON and TOML. ::: From c125360c3c3a44c43beb5cba779c2a0bea71b36d Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Wed, 30 Apr 2025 17:22:05 +0100 Subject: [PATCH 3/3] don't specifically mention a json-to-toml site --- .../docs/workers/wrangler/configuration.mdx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index e123e0dadec9e8..a1412be049d61d 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -21,7 +21,8 @@ As of Wrangler v3.91.0 Wrangler supports both JSON (`wrangler.json` or `wrangler Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, only the syntax differs. -You can also easily switch between the two, there are many online converters for that such as: [toml2jsonConverter](https://esakat.github.io/toml2jsonConverter). + +You can use one of the many available online converters to easily switch between the two. Throughout this page and the rest of Cloudflare's documentation, configuration snippets are provided as both JSON and TOML. @@ -1306,17 +1307,17 @@ A common example of using a redirected configuration is where a custom build too - ```toml title="wrangler.toml" - name = "my-worker" - main = "src/index.ts" - [[kv_namespaces]] - binding = "" - id = "" - ``` - +```toml title="wrangler.toml" +name = "my-worker" +main = "src/index.ts" +[[kv_namespaces]] +binding = "" +id = "" +``` + - Note that this configuration points `main` at the user's code entry-point. +Note that this configuration points `main` at the user's code entry-point. - Then, the user runs a custom build, which might read the user's Wrangler configuration file to find the source code entry-point: