You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say the above the configuration was in a directory called irc in a file called index.ts, the two keys above would become ircUsername and ircPassword. If the file was named something other than index, then that would be camelcased and inserted in between the folder name and the key name.
Automatically set env and args properties
Unless otherwise specified, the above mentioned keys would automatically be given the env of IRC_USERNAME and the arg of --irc-username.
I have also considered adding dynamic shorthand flags on a first come, first served basis and an auto-generated help command.
I submit these ideas for your consideration 🙂
The text was updated successfully, but these errors were encountered:
This is the code that I put in front of
convict
:And then I setup my
config
directory like so:The code that I have added recursively crawls the
config
directory and builds a config object forconvict
with these added benefits:Say the above the configuration was in a directory called
irc
in a file calledindex.ts
, the two keys above would becomeircUsername
andircPassword
. If the file was named something other than index, then that would be camelcased and inserted in between the folder name and the key name.env
andargs
propertiesUnless otherwise specified, the above mentioned keys would automatically be given the
env
ofIRC_USERNAME
and thearg
of--irc-username
.I have also considered adding dynamic shorthand flags on a first come, first served basis and an auto-generated help command.
I submit these ideas for your consideration 🙂
The text was updated successfully, but these errors were encountered: