From 64af79d42866b174dd7eedace8e924c95b9e09a2 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 27 Sep 2019 19:06:00 +0000 Subject: [PATCH] docs: update yargs and readme --- README.md | 2 +- src/bin/create-index.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b535461..43444fa 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Options: --extensions, -x Allows some extensions to be parsed as valid source. First extension will always be preferred to homonyms with another allowed extension. - [array] [default: ["js"]] + --outputFile, -o Output file [string] [default: "index.js"] [array] [default: ["js"]] Examples: create-index ./src ./src/utilities Creates or updates an existing diff --git a/src/bin/create-index.js b/src/bin/create-index.js index 4919cf3..dfb657b 100644 --- a/src/bin/create-index.js +++ b/src/bin/create-index.js @@ -53,6 +53,14 @@ const argv = yargs type: 'array' } }) + .options({ + outputFile: { + alias: 'o', + default: 'index.js', + description: 'Output file', + type: 'string', + } + }) .example( 'create-index ./src ./src/utilities', 'Creates or updates an existing create-index index file in the target (./src, ./src/utilities) directories.'