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
In my opinion, this sentence does not answer those questions.
All you have to care about is what to persist. This module will handle all the dull details like where and how.
Maybe that is intentional.
Experience
I just spent 2+ hours trying to understand when the file would be read. I found my answer by looking into the FAQ, which lead me to the env-paths module. Then I finally searched the source code, where I was able to identify my answers.
Answers Found
The file location is the result of setting cwd in the constructor.
Writing the file config file happens in the store setter, which is conditionally executed in the constructor.
Suggestion One
Add details to the Confconstructor description. Maybe something like this?
Returns a new instance using the default values and file input. Will persist a default value if missing.
Suggestion Two
In the FAQ, find a way to suggest it's a good idea to keep configuration of your application in a single module. During development this pattern is useful for creating a default config by running node path/to/config-module.js.
The text was updated successfully, but these errors were encountered:
Questions
Current Documentation
In my opinion, this sentence does not answer those questions.
Maybe that is intentional.
Experience
I just spent 2+ hours trying to understand when the file would be read. I found my answer by looking into the FAQ, which lead me to the env-paths module. Then I finally searched the source code, where I was able to identify my answers.
Answers Found
cwd
in the constructor.store
getter, which is executed in the constructor.store
setter, which is conditionally executed in the constructor.Suggestion One
Add details to the
Conf
constructor description. Maybe something like this?Suggestion Two
In the FAQ, find a way to suggest it's a good idea to keep configuration of your application in a single module. During development this pattern is useful for creating a default config by running
node path/to/config-module.js
.The text was updated successfully, but these errors were encountered: