Skip to content

Add support for split config files, "include" #111

@richteer

Description

@richteer

The main config.json should be able to include other config files on initial parse. This would allow:

  • large module configs to be self-contained
  • easier sharing of example configs
  • easier config templating -- cp template.json module_instance.json

On the other hand, it would make config editing by hand a bit more tedious, since now configs will be split up from one central location. Also, writing back to configs will have to be overhauled slightly to support this, and not stomp over the include directive.

Suggestion on how to implement:

As a key:

{
   "include": "foo:bar.json"
}

would resolve to:

{
    "foo":{...bar.json...}
}

As a value:

{
    "foo":"include:bar.json"
}

would resolve to:

{
    "foo":{...bar.json...}
}

The former is easiest to implement, and probably the cleanest. However, the latter may be needed in the event a config blob needs to be loaded as part of a list, e.g. "foo": ["include:bar.json", "include:baz.json"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions