Skip to content
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

Refactor config #85

Open
laggingreflex opened this issue Feb 22, 2017 · 1 comment
Open

Refactor config #85

laggingreflex opened this issue Feb 22, 2017 · 1 comment

Comments

@laggingreflex
Copy link
Contributor

I think config should be refactored. It'll probably be required to be done in #78, so here's a couple ideas that could be helpful to implement while refactoring

  • combine project config and CLI args.

    The two options I added in feat: disable triggerBigSync #84 (disableDeletion & disableRsync) can be configured by both project config as well as CLI args but it looks ugly if (!(params.disableDeletion || project.disableDeletion)) {. They should be combined before this check.

  • CLI params should override project config.

  • There should a default master config that should be applied for all projects. Currently all projects have their own separate configs and there's a lot of duplication in config itself that way. A master config could help a lot. The project config could then only be used to override the default one. (and CLI params still override them both)

@joelgriffith
Copy link
Contributor

Yeah, there's a package (I can't recall it) that sort of abstracts over all the possible configurations you can have (environment variables, command line switches, and more).

I'll take a look at exploring this Friday alongside getting stuff published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants