There can be the situation then same vatican-conf.json must be shared between some vatican instances (each in different directory).
For this case will be good (like issue #26) to use
- absolute path for
context
- offer a variable for path of vatican-conf.json (if absolute - ok, if relative then will be relative to
context)
At this time constructor of Vatican looks like
function Vatican(options) {
...
config = (options) ? options : require(CONFIG_FILE_PATH);
...
this.options = _.defaults( config, DEFAULT_CONFIG);
...
}
and has a very rigid behaviour (from options point of view) because in options can be fields that are not in config and fields that are not in options.
Maybe to define a new options.config which can match one of the cases
- if is undefined then
config will be read relative to current context
- if is false then
config will be not read (considered equal to {})
- is relative path
- is absolute path
and has less priority compared to options
this.options = _.defaults(options, config, DEFAULT_CONFIG);
There can be the situation then same vatican-conf.json must be shared between some vatican instances (each in different directory).
For this case will be good (like issue #26) to use
contextcontext)At this time constructor of Vatican looks like
and has a very rigid behaviour (from
optionspoint of view) because inoptionscan be fields that are not inconfigand fields that are not inoptions.Maybe to define a new
options.configwhich can match one of the casesconfigwill be read relative to current contextconfigwill be not read (considered equal to{})and has less priority compared to
options