From 9237d375b0b7d34c7dc5ba70aec7f616f4133732 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 1 Apr 2021 07:45:21 -0700 Subject: [PATCH] fix(docs): add workspaces configuration Adds workspaces configuration to `docs`, `repo`, and `set-script`. PR-URL: https://github.com/npm/cli/pull/3013 Credit: @wraithgar Close: #3013 Reviewed-by: @darcyclarke --- docs/content/commands/npm-docs.md | 13 +++++++++++++ docs/content/commands/npm-repo.md | 13 +++++++++++++ docs/content/commands/npm-set-script.md | 15 ++++++++++++++- lib/docs.js | 2 +- .../test-lib-utils-npm-usage.js-TAP.test.js | 2 +- 5 files changed, 42 insertions(+), 3 deletions(-) diff --git a/docs/content/commands/npm-docs.md b/docs/content/commands/npm-docs.md index c66e5fc627d66..d0971efa2e762 100644 --- a/docs/content/commands/npm-docs.md +++ b/docs/content/commands/npm-docs.md @@ -41,6 +41,19 @@ Set to `true` to use default system URL opener. The base URL of the npm package registry. +#### workspaces + +Enables workspaces context while searching the `package.json` in the +current folder. Documentation urls for the packages named in each +workspace will be opened. + +#### workspace + +Enables workspaces context and limits results to only those specified by +this config item. Only the documentation urls for the packages named in +the workspaces given here will be opened. + + ### See Also * [npm view](/commands/npm-view) diff --git a/docs/content/commands/npm-repo.md b/docs/content/commands/npm-repo.md index 670345bece5c5..c3d0da3fdcf15 100644 --- a/docs/content/commands/npm-repo.md +++ b/docs/content/commands/npm-repo.md @@ -31,6 +31,19 @@ terminal. Set to `true` to use default system URL opener. +#### workspaces + +Enables workspaces context while searching the `package.json` in the +current folder. Repo urls for the packages named in each workspace will +be opened. + +#### workspace + +Enables workspaces context and limits results to only those specified by +this config item. Only the repo urls for the packages named in the +workspaces given here will be opened. + + ### See Also * [npm docs](/commands/npm-docs) diff --git a/docs/content/commands/npm-set-script.md b/docs/content/commands/npm-set-script.md index 7bc8f75d23653..73e61883c505b 100644 --- a/docs/content/commands/npm-set-script.md +++ b/docs/content/commands/npm-set-script.md @@ -5,7 +5,7 @@ description: Set tasks in the scripts section of package.json --- ### Synopsis -An npm command that lets you create a task in the scripts section of the package.json. +An npm command that lets you create a task in the `scripts` section of the `package.json`. ```bash npm set-script [