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

Refactor getGlobalConfig usages #1783

Open
JGAntunes opened this issue Jan 20, 2021 · 0 comments
Open

Refactor getGlobalConfig usages #1783

JGAntunes opened this issue Jan 20, 2021 · 0 comments
Labels
technical-debt type: chore work needed to keep the product and development running smoothly

Comments

@JGAntunes
Copy link
Contributor

As part of #1725 we've added a memoise lib to our global-config module as its being required in multiple places such as telemetry and hooks and we wanted to avoid loading the config file multiple times. Ideally the getGlobalConfig should be called once when initialising our command - https://github.com/netlify/cli/blob/master/src/utils/command.js#L82 - and used from there afterwards. This will also allow us to remove the memoise usage afterwards - https://github.com/netlify/cli/blob/master/src/utils/get-global-config.js#L32

@JGAntunes JGAntunes added technical-debt type: chore work needed to keep the product and development running smoothly labels Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical-debt type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

No branches or pull requests

1 participant