Require minimist explicitly#8
Require minimist explicitly#8TheBrockEllis wants to merge 1 commit intotohagan:masterfrom TheBrockEllis:master
Conversation
Require the [cli] option to be explicitly stated before requiring the minimist package.
|
In it's current for this would force apps to include two command line parsers (minmist + your own). So I'm wondering itfwe might be wiser to create two libs .. a new one that performs everything that cli-config does except that you pass in a command line parser function and then update cli-config to use it. Then cli-config can still include minimist as a dependency and sends it as the parser and remain backward compatible in terms of dependencies. You can then use the new lib to replace minimist and not have to load it as a dependency. I'm a bit time stressed at the moment but hopefully will get some time next week for this. |
|
Sorry it's taken me a while to repond |
|
This is basically the same pattern we used for parsing config files in that you can replace the default JSON parser with a different parser like YAML. So it makes sense to offer the same pattern for the command line parser as well. |
Require the [cli] option to be explicitly stated before requiring the minimist package.
This will allow cli-config to serve in larger projects as a user configuration management tool and work in conjunction with other tools for parsing command line arguments.