Skip to content

Conversation

@petebacondarwin
Copy link
Contributor

Summary

Add Wrangler extended configuration docs.

Documentation checklist

@petebacondarwin petebacondarwin force-pushed the pbd/docs-for-wrangler-config-extension branch from 228ad4e to 1650a43 Compare November 13, 2024 17:32

## Extending user configuration

The main goal here is to allow tools to generate a partial configuration file that is merged into the user configuration when Wrangler commands are run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The main goal here is to allow tools to generate a partial configuration file that is merged into the user configuration when Wrangler commands are run.
You can allow tools to generate a partial configuration file that is merged into the user configuration when Wrangler commands are run.


The main goal here is to allow tools to generate a partial configuration file that is merged into the user configuration when Wrangler commands are run.

The file must be written to `./.wrangler/config/extra.json`. This path is relative to the project path, which is the directory containing the wrangler.toml or the current working directory if there is no wrangler.toml.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The file must be written to `./.wrangler/config/extra.json`. This path is relative to the project path, which is the directory containing the wrangler.toml or the current working directory if there is no wrangler.toml.
Write the partial configuration file to `./.wrangler/config/extra.json` in the current project directory, which is typically the directory containing the wrangler.toml.


The file must be written to `./.wrangler/config/extra.json`. This path is relative to the project path, which is the directory containing the wrangler.toml or the current working directory if there is no wrangler.toml.

The format of the file is a JSON object whose properties are the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. Notably it cannot contain the [top level only](#top-level-only-keys) configuration keys.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The format of the file is a JSON object whose properties are the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. Notably it cannot contain the [top level only](#top-level-only-keys) configuration keys.
The file must be a JSON object, containing the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. It cannot contain [top level only](#top-level-only-keys) keys.


The format of the file is a JSON object whose properties are the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. Notably it cannot contain the [top level only](#top-level-only-keys) configuration keys.

The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.
The configuration in this file is merged with the the currently selected environment and applied to all Wrangler commands. No manual action is required because Wrangler automatically detects and applies the file when it is present.

The format of the file is a JSON object whose properties are the [inheritable](#inheritable-keys) and [non-inheritable](#non-inheritable-keys) keys described above. Notably it cannot contain the [top level only](#top-level-only-keys) configuration keys.

The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


The configuration in this file will be merged into the configuration of the currently selected environment before being used in all Wrangler commands.

The user does not need to manually specify that this merging should happen. It is done automatically when the file is found.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The user does not need to manually specify that this merging should happen. It is done automatically when the file is found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this into the sentence above

@ToriLindsay
Copy link
Contributor

ToriLindsay commented Dec 2, 2024

Hi @petebacondarwin - I left some suggestions for making the content more direct and verb-driven.

@petebacondarwin
Copy link
Contributor Author

Oh I'm sorry @ToriLindsay - I meant to set this to draft. We are reconsidering the approach described here, so the docs will change considerably. But I appreciate the input and will try to follow it in the reworked PR later this week.

@petebacondarwin
Copy link
Contributor Author

petebacondarwin commented Dec 16, 2024

Closing as we are implementing this in a different way.

See cloudflare/workers-sdk#7442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants