From 2f5c28a68719e948d2efedf463ebcb35972aaefb Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 13 May 2021 13:46:30 -0700 Subject: fix(docs): autogenerate config docs for commands Add a script and Makefile rule to build the "Configuration" section for all command documentation based on the command classes' `params` list. Also correct several minor problems in the documentation, and add `params` listings for commands that were lacking them, to match the existing documentation and/or behavior within the code. PR-URL: https://github.com/npm/cli/pull/3243 Credit: @isaacs Close: #3243 Reviewed-by: @wraithgar --- lib/prefix.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/prefix.js') diff --git a/lib/prefix.js b/lib/prefix.js index 1298a3c5b..172f8d8fa 100644 --- a/lib/prefix.js +++ b/lib/prefix.js @@ -11,6 +11,11 @@ class Prefix extends BaseCommand { return 'prefix' } + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get params () { + return ['global'] + } + /* istanbul ignore next - see test/lib/load-all-commands.js */ static get usage () { return ['[-g]'] -- cgit v1.2.3