From 8f47520a639c0e88119f13d8c4794a088466c661 Mon Sep 17 00:00:00 2001 From: Alt Date: Sun, 28 Aug 2022 18:12:09 +0200 Subject: [PATCH] Add arg parameters to allow settings through CLI --- src/config.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/config.js b/src/config.js index 10feace..fcf7669 100644 --- a/src/config.js +++ b/src/config.js @@ -11,7 +11,8 @@ export let config = convict({ allowDeletingFiles: { doc: 'Allow deleting files in game if they get deleted off disk.', format: 'Boolean', - default: false + default: false, + arg: 'allowDeletingFiles', }, port: { doc: 'The port to bind to.', @@ -25,19 +26,21 @@ export let config = convict({ format: 'String', default: '.', env: 'BB_SCRIPTFOLDER', - arg: "folder" + arg: 'folder' }, quiet: { doc: 'Log less internal events to stdout.', format: 'Boolean', env: 'BB_VERBOSE', - default: false + default: false, + arg: 'quiet' }, dry: { doc: 'Only print the files to be synchronised.', format: 'Boolean', env: 'BB_DRY', - default: false + default: false, + arg: 'dry' }, definitionFile: { update: { @@ -57,7 +60,8 @@ export let config = convict({ doc: 'Push all files when initial connection is made.', format: 'Boolean', env: 'BB_CON_PUSH', - default: false + default: false, + arg: 'pushAllOnConnection' } });