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
API to locate, but not load, config files #176
Comments
Thanks for filing this @cspotcode. What are the reasons https://github.com/sindresorhus/find-up doesn't fulfill this need? I'm partly wondering because it might, and partly to make sure that we're aware of whatever the key difference is, so we'd preserve that in a locate-only implementation. |
find-up sounds like it fits the bill; I wasn't aware of it. I'll do some reading. |
find-up was perfect, thanks for the suggestion. mochajs/mocha#3830 Since I went that route, I'm no longer investigating cosmiconfig for mocha. I appreciate you taking the time to discuss my use-case and potential implementations. Please don't feel the need to keep this issue open on my account. |
Great, @cspotcode 👍 |
Coming from #172
It would be nice to use cosmiconfig to locate but not load a config file. This mechanism already exists internally but is not part of the API.
Ideally the API will allow requesting candidate files one at a time. If the first candidate should be skipped, the next is requested. This behavior already exists internally, via the
ignoreEmptySearchPlaces
option.If it matches the (async) iterator interface, users can do:
The text was updated successfully, but these errors were encountered: