cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

Document `wrangler.json` as an alternative to `wrangler.toml`

Open penalosa opened this issue 1 year ago • 2 comments

Summary

This ensures that all wrangler.toml snippets in the docs have a corresponding wrangler.json tab, showing the equivalent config in JSON format (supported by Wrangler with the -j flag). The JSON config has a comment explaining how to make Wrangler recognise the format.

No additional work is required to add these tabs—they're generated automatically for every toml snippet that references filename: wrangler.toml (to ensure we don't accidentally break e.g. cargo.toml files).

Some other things have also been changed/improved:

  • The tab system has been reworked to no longer require IDs, instead relying on child indexes in the DOM. These IDs were based on the hash of tab contents, which caused unexpected behaviour with multiple tabs on the same page with the same contents (as this change introduced in a few places)

Screenshots (optional)

Screenshot 2024-07-24 at 21 22 07

penalosa avatar Jul 24 '24 20:07 penalosa

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: ba9c601
Status: ✅  Deploy successful!
Preview URL: https://912a508f.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev

View logs

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/
https://developers.cloudflare.com/workers/wrangler/configuration/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/wrangler/configuration/
https://developers.cloudflare.com/workers/configuration/compatibility-dates/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/configuration/compatibility-dates/
https://developers.cloudflare.com/workers/runtime-apis/nodejs/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/runtime-apis/nodejs/
https://developers.cloudflare.com/d1/build-with-d1/local-development/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/d1/build-with-d1/local-development/
https://developers.cloudflare.com/hyperdrive/get-started/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/hyperdrive/get-started/
https://developers.cloudflare.com/kv/reference/kv-namespaces/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/kv/reference/kv-namespaces/
https://developers.cloudflare.com/queues/configuration/batching-retries/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/queues/configuration/batching-retries/
https://developers.cloudflare.com/workers/runtime-apis/bindings/mtls/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/runtime-apis/bindings/mtls/
https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/runtime-apis/bindings/version-metadata/
https://developers.cloudflare.com/workers/tutorials/postgres/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/tutorials/postgres/
https://developers.cloudflare.com/workers/tutorials/store-data-with-fauna/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/tutorials/store-data-with-fauna/
https://developers.cloudflare.com/workers/wrangler/custom-builds/ https://penalosa-document-toml-json.cloudflare-docs-7ou.pages.dev/workers/wrangler/custom-builds/

github-actions[bot] avatar Jul 24 '24 23:07 github-actions[bot]

👋Hi there, we’re going to close this PR. All PRs prior to August 12 need to be reworked due to the platform migration to Astro.

KimJ15 avatar Sep 27 '24 15:09 KimJ15