mintable
mintable copied to clipboard
Bug: v2.0.0 Beta - Any writes to JSON config clear comments
-
Add a comment to your
mintable.jsonc
:{ ... // my comment property: [...], .... }
-
Run
mintable account-setup
and add an account -
Comments get removed because the setup framework was not ever aware they existed (
jsonc.parse()
effectively strips them when parsing ajsonc
file with comments):{ ... property: [...], .... }
Pushed 15cd1ce to use jsonc.stringify
instead of JSON.stringify
but this is still broken & not sure really how to fix it.
Will keep jsonc
as the file extension since I think it would still be valuable to support comments once you get your mintable setup
done – it's also less likely any automated writes to the config file will happen after this point.
You could try something like this project: https://github.com/kaelzhang/node-comment-json
Thanks for the suggestion @user1278654 – definitely will check that out!