Closed ghost closed 10 years ago
with rc you can pass in a parsed argv object, https://github.com/dominictarr/rc/blob/master/index.js#L11
so, we can just do that from npmd with the types defined for global and the other options that need a shortcut.
this is fixed now.
The way npmd currently works, plugins can't easily specify their own option parsing. This presently creates a bug where:
doesn't work but
works. This is because the
install
command can't tell the option parsing that-g
is a boolean option, so the next argument shouldn't be parsed. The threading of theconfig
option with rc throughout the program is also problematic because certain other argument options like theconfig.cache
directory are inserted onto what therc
module provides. It would possibly be much cleaner for each plugin to handle option parsing itself by looking atprocess.argv
and then only thread the configuration through to modules, not the configuration along with the arguments.