You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 likeConfig#entries(overrides)
andConfig#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
The text was updated successfully, but these errors were encountered: