From c52c8c750622de8b2f78f47f66de31d10ed5ad5d Mon Sep 17 00:00:00 2001 From: David Pickart Date: Tue, 26 Nov 2019 16:26:24 -0600 Subject: [PATCH] Fix CLI naming in docs --- docs.md | 63 +++++++++++++++++++++--------------------------- package.json | 2 +- src/cli/index.js | 17 +++++++------ 3 files changed, 38 insertions(+), 44 deletions(-) diff --git a/docs.md b/docs.md index d7e9e13..bc371db 100644 --- a/docs.md +++ b/docs.md @@ -2,19 +2,18 @@ ### Table of Contents -- [main][1] - - [Parameters][2] -- [load][3] - - [Parameters][4] - - [Examples][5] -- [read][6] - - [Parameters][7] - - [Examples][8] -- [requireKeys][9] - - [Parameters][10] - - [Examples][11] - -## main +- [CLI][1] +- [load][2] + - [Parameters][3] + - [Examples][4] +- [read][5] + - [Parameters][6] + - [Examples][7] +- [requireKeys][8] + - [Parameters][9] + - [Examples][10] + +## CLI This module exposes a CLI that can be run with `yarn figaro`. @@ -26,14 +25,10 @@ For more information: `$ yarn figaro -h` -### Parameters - -- `args` (optional, default `process.argv`) - ## load A function that loads env variables into `process.env`. -Internally calls [read][6] and merges the result into `process.env`. +Internally calls [read][5] and merges the result into `process.env`. **Options** @@ -44,7 +39,7 @@ Internally calls [read][6] and merges the result into `process.env`. ### Parameters -- `options` **[object][12]** Options for the function as specified above. +- `options` **[object][11]** Options for the function as specified above. ### Examples @@ -81,7 +76,7 @@ The latter will only be loaded if the current environment matches the environmen ### Parameters -- `options` **[object][12]** Options for the function as specified above. +- `options` **[object][11]** Options for the function as specified above. ### Examples @@ -116,7 +111,7 @@ If they exist in `process.env`, it returns `true`; if not, it throws an exceptio ### Parameters -- `keys` **...[string][13]** The required keys +- `keys` **...[string][12]** The required keys ### Examples @@ -130,28 +125,26 @@ if (requireKeys('MY_KEY', 'ANOTHER_KEY')) { * ``` -[1]: #main - -[2]: #parameters +[1]: #cli -[3]: #load +[2]: #load -[4]: #parameters-1 +[3]: #parameters -[5]: #examples +[4]: #examples -[6]: #read +[5]: #read -[7]: #parameters-2 +[6]: #parameters-1 -[8]: #examples-1 +[7]: #examples-1 -[9]: #requirekeys +[8]: #requirekeys -[10]: #parameters-3 +[9]: #parameters-2 -[11]: #examples-2 +[10]: #examples-2 -[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object +[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object -[13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String +[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String diff --git a/package.json b/package.json index 20b69b5..629b06e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "figaro-js", - "version": "3.0.2", + "version": "3.0.3", "description": "Env variable management in JS", "main": "lib/index.js", "bin": { diff --git a/src/cli/index.js b/src/cli/index.js index b3b6904..ee007bd 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -5,19 +5,20 @@ import registerHerokuCommands from './heroku' /** * This module exposes a CLI that can be run with `yarn figaro`. - * + * * Using the `heroku:set` command, you can set values from your configuration file all at once: - * + * * `$ yarn figaro heroku:set -e production` - * + * * For more information: - * + * * `$ yarn figaro -h` - * + * * @name CLI -**/ + * @type Function + **/ -function main (args=process.argv) { +function main(args = process.argv) { const program = new Command() registerHerokuCommands(program) return program.parse(args) @@ -26,4 +27,4 @@ function main (args=process.argv) { // Exported for testing export default main -if (!module.parent) main() \ No newline at end of file +if (!module.parent) main()