-
Notifications
You must be signed in to change notification settings - Fork 53
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
Pass elder config to constructor #52
Conversation
…se instead of process.cwd(). Let it default to process.cwd()
… flexibility. Merge it with existing or default configuration.
# Conflicts: # package-lock.json # src/Elder.ts # src/externalHelpers.ts # src/hooks.ts # src/routes/routes.ts # src/utils/getConfig.ts # src/utils/getHashedSvelteComponents.ts # src/utils/svelteComponent.ts # src/utils/types.ts # src/utils/validations.ts # yarn.lock
… context to getConfig
@nickreese 1 test is still failing and I have no clue why. Could you have a look / point me in the right direction? |
@@ -74,12 +74,12 @@ class Elder { | |||
|
|||
shortcodes: ShortcodeDefs; | |||
|
|||
constructor({ context, worker = false }) { | |||
constructor({ context, worker = false, configOptions = {} }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@decrek as you mentioned, these config options would ideally be on the same nesting level as context
and worder
, so maybe do this:
constructor({ context, worker = false, ...configOptions })
then configOptions
will always be an object with all the other options (and {}
if no other options are given).
@decrek I will try and get to this PR this week. Had some pressing health issues come up. |
@decrek @jbmoelker no idea how to use the new |
This PR adds the ability to pass Elder config options to the Elder constructor and thus bypassing/overruling cosmiconfig finding the elder config file. For a full reasoning why I want that see #28.
Resolves #28.