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

config: explore different API designs #6

Open
dominicbarnes opened this issue Jul 1, 2017 · 0 comments
Open

config: explore different API designs #6

dominicbarnes opened this issue Jul 1, 2017 · 0 comments
Labels

Comments

@dominicbarnes
Copy link
Member

From @dominicbarnes on November 17, 2016 5:11

The more time goes on, the more I want a more robust API around config. Currently, the export of a "static" object is getting more complex as more cases need to be handled during that initial load.

What I think would be best is to create a Config class, which can be constructed from a JSON string or a parsed object. It would exposed methods like Config#entries(overrides) and Config#root() that would perform the relevant normalization. This would allow for a much more easily testable module, in addition to being a lot more robust as an end-user.

There could even be a Config#runner() which creates a trimmed down config that can be passed directly to a mako runner.

Copied from original issue: makojs/config#20

@dominicbarnes dominicbarnes changed the title Export a more robust API config: explore different API designs Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant