Refactor config
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 #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)
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