Closed IMax153 closed 11 months ago
Latest commit: 82369e4648777a749b130de835d8e5a976839121
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Good start, I think we once we add some apis for working with config files to /cli it will remove some of the ceremony.
Good start, I think we once we add some apis for working with config files to /cli it will remove some of the ceremony.
I agree, we definitely need better APIs for handling these kinds of nested structures because loading a fully array or full object as a config value is currently a bit cumbersome.
The work in this PR allows for configuration to be loaded from either the command-line arguments, the environment, or from the
docgen.json
file.The precedence for loading configuration is as follows:
DOCGEN_
docgen.json
All configuration parameters can be loaded from any one of the three sources listed above and they will be merged together. This is thanks to the
ConfigProvider
implementation that is included in this PR.