dominictarr / rc

The non-configurable configuration loader for lazy people.
Other
1.02k stars 97 forks source link

feature request: allow --appname to change appname before anything else #102

Open kapouer opened 6 years ago

kapouer commented 6 years ago

This would be only allowed through cli arg, as it would not make sense in any config file. However, changing the appname requires parsing cli args before calling rc, at which point rc parses cli args...

cspotcode commented 5 years ago

rc performs default argv parsing like this:

require('minimist')(process.argv.slice(2))

So you can pretty easily do this manually yourself, then check for an appname property and pass it into rc.