Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for nested configs #37

Open
yugal-dream11 opened this issue Jul 9, 2019 · 0 comments
Open

Support for nested configs #37

yugal-dream11 opened this issue Jul 9, 2019 · 0 comments

Comments

@yugal-dream11
Copy link

Current config creation

  • Declare all configuration properties at one root level folder defaulting to config
  • Builds one config for the application with one type definition

Issues with current approach

  • Does not support modularised config maintenance
  • Resulting in cluttered config which becomes difficult to reason about.

Proposed extension for nested configs

  • Ability to have module/folder level config
  • Explicit type definition for nested configs
  • Explicit config creation for nested configs
  • Import configs relatively

Expected support

  • Supports annotated variable replacements
  • Expects default.json to be present at nested config levels
  • Generates corrects typings and config json

Example

Input folder structure

├── config
│   ├── default.json
│   ├── deployment
│   │   └── www.example.com.json
│   ├── env
│   │   └── production.json
│   └── user
│       └── root.json
└── module-1
    └── config
        ├── default.json
        ├── deployment
        │   └── www.example.com.json
        ├── env
        │   └── production.json
        └── user
            └── root.json

Resulting config creation

├── config
│   ├── default.json
│   ├── deployment
│   │   └── www.example.com.json
│   ├── env
│   │   └── production.json
│   ├── index.d.ts
│   ├── index.js
│   └── user
│       └── root.json
└── module-1
    └── config
        ├── default.json
        ├── deployment
        │   └── www.example.com.json
        ├── env
        │   └── production.json
        ├── index.d.ts
        ├── index.js
        └── user
            └── root.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant