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
Refactor conf.definitionMap
as a module
#1954
Comments
Or maybe modularize |
I agree. We should not be using |
@marcoscaceres What should be the module look like? I'm thinking about two choices:
|
I was thinking the opposite. I don't think we need a module for configuration, as it's always just passed as an argument when a plugin is initialized (which I think makes sense). But what we should check is where random things get added to |
It makes sense, but it's still a pain because frequently its functions have to share the config object and the only good way is to pass it as an argument every time. |
I’m open to exploring the pain points, fwiw. Another option is to simply access My main concern with the export would be around it being racy. The current design assures that respecConfig is the whatever is available after load. |
Accessing global is no-go for me, as one of my ultimate hope is to make ReSpec node-able, in other words, to process documents without a full browser executable (#1469).
IMO it should probably be okay as the |
Ok, let’s play this out a bit. How do you envision user configuration working with the module? |
I would keep the global |
(I will try the definition map thing first as we have a consensus.) |
definitionMap
is not really a configuration, it's a collection of elements set in run-time. Maybeimport { definitionMap } from "./dfn";
should be preferred as currently passingconf.definitionMap
to functions is a pain.The text was updated successfully, but these errors were encountered: