Coming back to this, nearly a year late, since it worked so wasn’t any need to fix this just yet.
But coming:
Ideas
Single object constructor, using an object to pass all the data down new Config({ ... })
Not going to add the loading of configuration files, that is overkill, as it’s primary usage is for cli options and mixing it with enviromental variables
A better options prefix, so we can use the above: ‘Set the envMap there, or if a env-prefix is passed it will work like REACT_APP_X or npm_config_x’
As I would like to use this as my base for all the CLI based systems, be is a service, or a CLI itself, this needs to be generic but also customisable
Future may be depreciated for a fork of
npmcli/config
but for now, it needs work.TODO:
env-prefix
is passed it will work like REACT_APP_X or npm_config_xConfig.constructor
is never passed back ??