gh icon indicating copy to clipboard operation
gh copied to clipboard

Improve configuration file

Open henvic opened this issue 9 years ago • 4 comments

  • Remove the hooks from the configuration file and put it somewhere else
  • Version the changes on the hooks and, maybe, configuration
  • Change format from JSON to something more humane, like YAML (not a priority)

henvic avatar Apr 06 '15 22:04 henvic

Something quite useful would be to split the secret parts, like the API token, into a separate file. The latter could have o400 access permissions. My motivation is that in case you are recording your screen, you may spill information that would compromise your account just by editing (unrelated) options in the configuration. This won't happen if secret parts are separated, as you simply never touch that file.

Byron avatar May 09 '15 09:05 Byron

Make it YAML would be more convenient so you can comment hooks rather than delete them e.g.

epoberezkin avatar Jan 04 '17 12:01 epoberezkin

@epoberezkin, I currently have no time for doing that. I am open to pull requests, given that:

  1. MUST be 100% backwards compatible
  2. The pull request is easy to understand and doesn't break things
  3. The new parts are well tested

Though, it should not be an easy task anyways. Maybe JSON5 is easier (though not as good as YAML or .ini would be).

Off-topic(?): I am using .ini for the CLI of http://wedeploy.com (which is written in Go) and it is working like a charm. I have tried YAML, but found out maintaining a .ini was more user friendly & straight-forward for my needs on that tool.

henvic avatar Jan 04 '17 18:01 henvic

I would prefer json5 since it is more idiomatic to JS devs. We could simply add this require('json5/lib/register') before we load the json config.

protoEvangelion avatar Jan 05 '19 22:01 protoEvangelion