yeoman / configstore

Easily load and persist config without having to think about where and how
BSD 2-Clause "Simplified" License
868 stars 57 forks source link

feat: serde option to allow alternatives to JSON #60

Closed jstewmon closed 5 years ago

jstewmon commented 6 years ago

I'd like to use configstore with yaml serde.

I see one issue, which I did not address in this PR - the check for a SyntaxError clearing the file. Does that feature serve a meaningful purpose? It worries me that if I open a file to edit it, make a syntax mistake, run a program that reads the file, lose the entire contents!?

sindresorhus commented 5 years ago

I think it should just be three top-level options:

Because they can be individually useful.

These should be documented individually and the YAML usage example should be moved to a Tips section further down in the readme.

I would also be happy to accept this change in conf instead, which is a more modern rethink of this module.

jstewmon commented 5 years ago

Thanks for the feedback! I opened sindresorhus/conf#59, so we can close this one unless you want to include it here too.

sindresorhus commented 5 years ago

Yeah, closing.