From 2c9b8713c4c88fbd0c3c48eb0de84dbd7269398f Mon Sep 17 00:00:00 2001 From: wangsai Date: Mon, 3 May 2021 19:38:36 +0800 Subject: [PATCH] fix(docs): fix broken links PR-URL: https://github.com/npm/cli/pull/3182 Credit: @wangsai Close: #3182 Reviewed-by: @wraithgar --- docs/content/commands/npm-ci.md | 2 +- docs/content/commands/npm-dedupe.md | 8 ++++---- docs/content/commands/npm-deprecate.md | 4 ++-- docs/content/commands/npm-explore.md | 1 - docs/content/commands/npm-find-dupes.md | 8 ++++---- docs/content/commands/npm-install.md | 1 - docs/content/commands/npm-unpublish.md | 4 ++-- docs/content/commands/npm-view.md | 2 +- docs/content/commands/npm.md | 2 +- docs/content/configuring-npm/folders.md | 2 +- docs/content/configuring-npm/package-json.md | 2 +- docs/content/using-npm/scripts.md | 7 +------ 12 files changed, 18 insertions(+), 25 deletions(-) diff --git a/docs/content/commands/npm-ci.md b/docs/content/commands/npm-ci.md index 925ba8de2e5b7..937553631ace5 100644 --- a/docs/content/commands/npm-ci.md +++ b/docs/content/commands/npm-ci.md @@ -12,7 +12,7 @@ npm ci ### Description -This command is similar to [`npm install`](/cli-commands/install), except +This command is similar to [`npm install`](/commands/npm-install), except it's meant to be used in automated environments such as test platforms, continuous integration, and deployment -- or any situation where you want to make sure you're doing a clean install of your dependencies. diff --git a/docs/content/commands/npm-dedupe.md b/docs/content/commands/npm-dedupe.md index c6d26126d3077..f9bfd9e01532e 100644 --- a/docs/content/commands/npm-dedupe.md +++ b/docs/content/commands/npm-dedupe.md @@ -74,7 +74,7 @@ Using `npm find-dupes` will run the command in `--dry-run` mode. ### See Also -* [npm find-dupes](/cli-commands/find-dupes) -* [npm ls](/cli-commands/ls) -* [npm update](/cli-commands/update) -* [npm install](/cli-commands/install) +* [npm find-dupes](/commands/npm-find-dupes) +* [npm ls](/commands/npm-ls) +* [npm update](/commands/npm-update) +* [npm install](/commands/npm-install) diff --git a/docs/content/commands/npm-deprecate.md b/docs/content/commands/npm-deprecate.md index 0603797661055..73d88b3717bd1 100644 --- a/docs/content/commands/npm-deprecate.md +++ b/docs/content/commands/npm-deprecate.md @@ -44,5 +44,5 @@ format an empty string. * [npm publish](/commands/npm-publish) * [npm registry](/using-npm/registry) -* [npm owner](/cli-commands/owner) -* [npm owner](/cli-commands/adduser) +* [npm owner](/commands/npm-owner) +* [npm owner](/commands/npm-adduser) diff --git a/docs/content/commands/npm-explore.md b/docs/content/commands/npm-explore.md index 7e2004b84c041..8bad293052ead 100644 --- a/docs/content/commands/npm-explore.md +++ b/docs/content/commands/npm-explore.md @@ -44,5 +44,4 @@ The shell to run for the `npm explore` command. * [npm folders](/configuring-npm/folders) * [npm edit](/commands/npm-edit) * [npm rebuild](/commands/npm-rebuild) -* [npm build](/commands/npm-build) * [npm install](/commands/npm-install) diff --git a/docs/content/commands/npm-find-dupes.md b/docs/content/commands/npm-find-dupes.md index 6f55d47bfd7f3..6557a071c82c0 100644 --- a/docs/content/commands/npm-find-dupes.md +++ b/docs/content/commands/npm-find-dupes.md @@ -17,8 +17,8 @@ duplications, without actually changing the package tree. ### See Also -* [npm dedupe](/cli-commands/dedupe) -* [npm ls](/cli-commands/ls) -* [npm update](/cli-commands/update) -* [npm install](/cli-commands/install) +* [npm dedupe](/commands/npm-dedupe) +* [npm ls](/commands/npm-ls) +* [npm update](/commands/npm-update) +* [npm install](/commands/npm-install) diff --git a/docs/content/commands/npm-install.md b/docs/content/commands/npm-install.md index 5ab9275ee4eaf..f81a8a2463989 100644 --- a/docs/content/commands/npm-install.md +++ b/docs/content/commands/npm-install.md @@ -538,7 +538,6 @@ the specific folder structures that npm creates. * [npm link](/commands/npm-link) * [npm rebuild](/commands/npm-rebuild) * [npm scripts](/using-npm/scripts) -* [npm build](/commands/npm-build) * [npm config](/commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [npm registry](/using-npm/registry) diff --git a/docs/content/commands/npm-unpublish.md b/docs/content/commands/npm-unpublish.md index e9d6e9045c6f9..2ce52d3f8cd44 100644 --- a/docs/content/commands/npm-unpublish.md +++ b/docs/content/commands/npm-unpublish.md @@ -34,7 +34,7 @@ This removes a package version from the registry, deleting its entry and removing the tarball. The npm registry will return an error if you are not [logged -in](/commands/npm-login). +in](/commands/npm-adduser). If you do not specify a version or if you remove all of a package's versions then the registry will remove the root package entry entirely. @@ -52,4 +52,4 @@ passed. * [npm registry](/using-npm/registry) * [npm adduser](/commands/npm-adduser) * [npm owner](/commands/npm-owner) -* [npm login](/commands/npm-login) +* [npm login](/commands/npm-adduser) diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md index 8f7e886ed192a..982ba29955179 100644 --- a/docs/content/commands/npm-view.md +++ b/docs/content/commands/npm-view.md @@ -73,7 +73,7 @@ npm view express contributors.name contributors.email "Person" fields are shown as a string if they would be shown as an object. So, for example, this will show the list of `npm` contributors in -the shortened string format. (See [`package.json`](/configuring-npm/package.json) for more on this.) +the shortened string format. (See [`package.json`](/configuring-npm/package-json) for more on this.) ```bash npm view npm contributors diff --git a/docs/content/commands/npm.md b/docs/content/commands/npm.md index d01146d37041c..2d86aa62c0080 100644 --- a/docs/content/commands/npm.md +++ b/docs/content/commands/npm.md @@ -107,7 +107,7 @@ following help topics: Create an account or log in. When you do this, npm will store credentials in the user config file config file. * publish: - Use the [`npm publish`](/commands/npm-publish`) command to upload your + Use the [`npm publish`](/commands/npm-publish) command to upload your code to the registry. #### Configuration diff --git a/docs/content/configuring-npm/folders.md b/docs/content/configuring-npm/folders.md index 3ec716f2c67fd..75e31cd733161 100644 --- a/docs/content/configuring-npm/folders.md +++ b/docs/content/configuring-npm/folders.md @@ -205,7 +205,7 @@ not be included in the package tarball. This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See [`package.json`](/configuring-npm/package.json) for more information. +cannot be found elsewhere. See [`package.json`](/configuring-npm/package-json) for more information. ### See also diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index f5519f62bb32e..3ed0399021447 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -566,7 +566,7 @@ tarball or git URL. **Please do not put test harnesses or transpilers or other "development" time tools in your `dependencies` object.** See `devDependencies`, below. -See [semver](/using-npm/semver#versions) for more details about specifying version ranges. +See [semver](https://github.com/npm/node-semver#versions) for more details about specifying version ranges. * `version` Must match `version` exactly * `>version` Must be greater than `version` diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md index 9312a21546d6f..82cde7d79094d 100644 --- a/docs/content/using-npm/scripts.md +++ b/docs/content/using-npm/scripts.md @@ -118,11 +118,6 @@ The advantage of doing these things at `prepublish` time is that they can be don * `prepare` -#### [`npm env`](/commands/npm-env) - -* `env` (You can override the default behavior of `npm env` by defining - a custom `env` entry in your `scripts` object) - #### [`npm install`](/commands/npm-install) These also run when you run `npm install -g ` @@ -179,7 +174,7 @@ If there is a `restart` script defined, these events are run, otherwise * `restart` * `postrestart` -#### [`npm run `](/commands/npm-run) +#### [`npm run `](/commands/npm-run-script) * `pre` * ``