The outputs field in your TOML configuration is indeed nested, which can make it less readable and more complex to work with. Here are some thoughts on how to improve or handle this structure:
1. Flatten the Structure (If Possible)
If the tool or application you're using allows for a flatter structure, consider restructuring it to reduce nesting. For example:
Then include them in a main file (if the tool supports it).
5. Use a Preprocessor or Tooling
If you're generating this TOML programmatically (e.g., with a script), you could use a preprocessor or templating tool to generate the nested structure dynamically. This keeps the source code cleaner while producing the required output.
6. Check for Alternative Formats
If TOML's nesting is too cumbersome, check if the tool supports other formats like YAML or JSON, which might handle nesting more gracefully. For example, in YAML:
The current structure is valid TOML, and if the tool requires it, you may not have much choice. However, if you have control over the tool's configuration format, consider simplifying or flattening the structure. Otherwise, focus on documenting and organizing the configuration to make it easier to understand.