Skip to content

Require minimist explicitly#8

Open
TheBrockEllis wants to merge 1 commit intotohagan:masterfrom
TheBrockEllis:master
Open

Require minimist explicitly#8
TheBrockEllis wants to merge 1 commit intotohagan:masterfrom
TheBrockEllis:master

Conversation

@TheBrockEllis
Copy link

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.

Require the [cli] option to be explicitly stated before requiring the
minimist package.
@tohagan
Copy link
Owner

tohagan commented Oct 16, 2014

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.

@tohagan
Copy link
Owner

tohagan commented Oct 16, 2014

Sorry it's taken me a while to repond

@tohagan
Copy link
Owner

tohagan commented Oct 16, 2014

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.

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

Successfully merging this pull request may close these issues.

2 participants