From b9d1b84cb28f087b7a14c825da3fadbb50679df2 Mon Sep 17 00:00:00 2001 From: Shaun Hurley Date: Thu, 7 Apr 2022 17:25:19 -0400 Subject: [PATCH] Allow use of yargs .config() / --config option to specify paramters be read from a file. --- README.md | 3 +++ index.js | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index f558e99..b026052 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,9 @@ $ npx aws-api-gateway-cli-test --options This command takes the following options: +- `config` + Read parameters from a file. File must be valid JSON and end in a .json extension. Command line parameters will override the same config file parameter. + - `username` The username of the Cognito User Pool user. diff --git a/index.js b/index.js index 234fde8..c7bb4ed 100755 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ global.navigator = function() { }; var argv = require("yargs") + .config() .option("username", { describe: "Username of the user", demandOption: true,