From 9905701896f7028d2cd7ac607ae03e74abdb9403 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sat, 2 Aug 2025 20:55:21 +0300 Subject: [PATCH] npm*: simplify more info links, add aliases and fix titles (#17460) --- pages/common/npm-bugs.md | 4 ++-- pages/common/npm-cache.md | 6 +++--- pages/common/npm-check.md | 2 +- pages/common/npm-ci.md | 2 +- pages/common/npm-config.md | 18 +++++++++--------- pages/common/npm-dedupe.md | 14 +++++++------- pages/common/npm-deprecate.md | 2 +- pages/common/npm-doctor.md | 2 +- pages/common/npm-find-dupes.md | 2 +- pages/common/npm-fund.md | 2 +- pages/common/npm-init.md | 2 +- pages/common/npm-install.md | 10 +++++----- pages/common/npm-login.md | 2 +- pages/common/npm-logout.md | 2 +- pages/common/npm-ls.md | 2 +- pages/common/npm-name.md | 2 +- pages/common/npm-org.md | 2 +- pages/common/npm-outdated.md | 2 +- pages/common/npm-owner.md | 2 +- pages/common/npm-query.md | 2 +- pages/common/npm-root.md | 2 +- pages/common/npm-run.md | 4 ++-- pages/common/npm-search.md | 14 +++++++------- pages/common/npm-star.md | 2 +- pages/common/npm-team.md | 2 +- pages/common/npm-token.md | 2 +- pages/common/npm-uninstall.md | 8 ++++---- pages/common/npm-unpublish.md | 2 +- pages/common/npm-unstar.md | 2 +- pages/common/npm-update.md | 10 +++++----- pages/common/npm-version.md | 2 +- pages/common/npm-view.md | 16 ++++++++-------- pages/common/npm-why.md | 2 +- pages/common/npm.md | 16 ++++++++-------- 34 files changed, 83 insertions(+), 83 deletions(-) diff --git a/pages/common/npm-bugs.md b/pages/common/npm-bugs.md index b550630a51..4b6686f6e0 100644 --- a/pages/common/npm-bugs.md +++ b/pages/common/npm-bugs.md @@ -14,8 +14,8 @@ - Configure the browser used to open URLs by setting your preferred browser for `npm` commands: -`npm config set browser {{browser_name}}` +`npm {{[c|config]}} set browser {{browser_name}}` - Control URL opening: set `browser` to `true` for the system URL opener, or `false` to print URLs in the terminal: -`npm config set browser {{true|false}}` +`npm {{[c|config]}} set browser {{true|false}}` diff --git a/pages/common/npm-cache.md b/pages/common/npm-cache.md index 1837f64bcb..cc9c595867 100644 --- a/pages/common/npm-cache.md +++ b/pages/common/npm-cache.md @@ -1,7 +1,7 @@ # npm cache > Manage the npm package cache. -> More information: . +> More information: . - Add a specific package to the cache: @@ -29,8 +29,8 @@ - Show the cache path: -`npm config get cache` +`npm {{[c|config]}} get cache` - Change the cache path: -`npm config set cache {{path/to/directory}}` +`npm {{[c|config]}} set cache {{path/to/directory}}` diff --git a/pages/common/npm-check.md b/pages/common/npm-check.md index d30b484316..3bd3b0d659 100644 --- a/pages/common/npm-check.md +++ b/pages/common/npm-check.md @@ -1,4 +1,4 @@ -# npm check +# npm-check > Check for outdated, incorrect, and unused npm package dependencies. > More information: . diff --git a/pages/common/npm-ci.md b/pages/common/npm-ci.md index caf32ddc14..4d29dc2ab1 100644 --- a/pages/common/npm-ci.md +++ b/pages/common/npm-ci.md @@ -2,7 +2,7 @@ > Clean install of `npm` project dependencies for automated environments. > Installs packages based on `package-lock.json` or `npm-shrinkwrap.json`. -> More information: . +> More information: . - Install project dependencies from `package-lock.json` or `npm-shrinkwrap.json`: diff --git a/pages/common/npm-config.md b/pages/common/npm-config.md index 85f8ef85f8..7e35b0b6fb 100644 --- a/pages/common/npm-config.md +++ b/pages/common/npm-config.md @@ -1,32 +1,32 @@ -# npm-config +# npm config > Manage the `npm` configuration settings. -> More information: . +> More information: . - Show all configuration settings: -`npm config list` +`npm {{[c|config]}} list` - List all configuration settings as `JSON`: -`npm config list --json` +`npm {{[c|config]}} list --json` - Get the value of a specific configuration key: -`npm config get {{key}}` +`npm {{[c|config]}} get {{key}}` - Set a configuration key to a specific value: -`npm config set {{key}} {{value}}` +`npm {{[c|config]}} set {{key}} {{value}}` - Delete a configuration key: -`npm config delete {{key}}` +`npm {{[c|config]}} delete {{key}}` - Edit the global npm configuration file in the default editor: -`npm config edit` +`npm {{[c|config]}} edit` - Attempt to repair invalid configuration items: -`npm config fix` +`npm {{[c|config]}} fix` diff --git a/pages/common/npm-dedupe.md b/pages/common/npm-dedupe.md index 365f3c488f..170c9c5fe1 100644 --- a/pages/common/npm-dedupe.md +++ b/pages/common/npm-dedupe.md @@ -1,28 +1,28 @@ # npm dedupe > Reduce duplication in the `node_modules` directory. -> More information: . +> More information: . - Deduplicate packages in `node_modules`: -`npm dedupe` +`npm {{[ddp|dedupe]}}` - Follow `package-lock.json` or `npm-shrinkwrap.json` during deduplication: -`npm dedupe --lock` +`npm {{[ddp|dedupe]}} --lock` - Run deduplication in strict mode: -`npm dedupe --strict` +`npm {{[ddp|dedupe]}} --strict` - Skip optional/peer dependencies during deduplication: -`npm dedupe --omit {{optional|peer}}` +`npm {{[ddp|dedupe]}} --omit {{optional|peer}}` - Enable detailed logging for troubleshooting: -`npm dedupe --loglevel verbose` +`npm {{[ddp|dedupe]}} --loglevel verbose` - Limit deduplication to a specific package: -`npm dedupe {{package_name}}` +`npm {{[ddp|dedupe]}} {{package_name}}` diff --git a/pages/common/npm-deprecate.md b/pages/common/npm-deprecate.md index 5435d1ba9c..e9e2b112e7 100644 --- a/pages/common/npm-deprecate.md +++ b/pages/common/npm-deprecate.md @@ -1,7 +1,7 @@ # npm deprecate > Mark a version or range of versions of an `npm` package as deprecated. -> More information: . +> More information: . - Deprecate a specific version of a package: diff --git a/pages/common/npm-doctor.md b/pages/common/npm-doctor.md index 81adebe362..58317c6243 100644 --- a/pages/common/npm-doctor.md +++ b/pages/common/npm-doctor.md @@ -1,7 +1,7 @@ # npm doctor > Check the health of the npm environment. -> More information: . +> More information: . - Run all default health checks for `npm`: diff --git a/pages/common/npm-find-dupes.md b/pages/common/npm-find-dupes.md index b08740e9a4..3c2efa6301 100644 --- a/pages/common/npm-find-dupes.md +++ b/pages/common/npm-find-dupes.md @@ -1,7 +1,7 @@ # npm find-dupes > Identify duplicate dependencies in `node_modules`. -> More information: . +> More information: . - List all duplicate packages within `node_modules`: diff --git a/pages/common/npm-fund.md b/pages/common/npm-fund.md index e3cd45f7ac..d5dd8e21f0 100644 --- a/pages/common/npm-fund.md +++ b/pages/common/npm-fund.md @@ -1,7 +1,7 @@ # npm fund > Retrieve funding information from packages. -> More information: . +> More information: . - List dependencies with funding URL for the project in the current directory: diff --git a/pages/common/npm-init.md b/pages/common/npm-init.md index a791570d03..73eeb21635 100644 --- a/pages/common/npm-init.md +++ b/pages/common/npm-init.md @@ -1,7 +1,7 @@ # npm init > Create a `package.json` file. -> More information: . +> More information: . - Initialize a new package with prompts: diff --git a/pages/common/npm-install.md b/pages/common/npm-install.md index b406e06fd8..8a6b6e3c0e 100644 --- a/pages/common/npm-install.md +++ b/pages/common/npm-install.md @@ -1,20 +1,20 @@ # npm install > Install Node packages. -> More information: . +> More information: . - Install dependencies listed in `package.json`: -`npm install` +`npm {{[i|install]}}` - Download a specific version of a package and add it to the list of dependencies in `package.json`: -`npm install {{package_name}}@{{version}}` +`npm {{[i|install]}} {{package_name}}@{{version}}` - Download the latest version of a package and add it to the list of dev dependencies in `package.json`: -`npm install {{package_name}} {{[-D|--save-dev]}}` +`npm {{[i|install]}} {{package_name}} {{[-D|--save-dev]}}` - Download the latest version of a package and install it globally: -`npm install {{[-g|--global]}} {{package_name}}` +`npm {{[i|install]}} {{[-g|--global]}} {{package_name}}` diff --git a/pages/common/npm-login.md b/pages/common/npm-login.md index 7461967add..b726777d1f 100644 --- a/pages/common/npm-login.md +++ b/pages/common/npm-login.md @@ -2,7 +2,7 @@ > Log in to a registry user account. > See also: `npm logout` for logging out. -> More information: . +> More information: . - Log in to a registry user account and save the credentials to the `.npmrc` file: diff --git a/pages/common/npm-logout.md b/pages/common/npm-logout.md index 10700af6b6..6ea2507dcd 100644 --- a/pages/common/npm-logout.md +++ b/pages/common/npm-logout.md @@ -2,7 +2,7 @@ > Log out of the registry user account. > See also: `npm login` for logging in. -> More information: . +> More information: . - Log out of the registry user account: diff --git a/pages/common/npm-ls.md b/pages/common/npm-ls.md index 735d95f8f8..b735218c17 100644 --- a/pages/common/npm-ls.md +++ b/pages/common/npm-ls.md @@ -1,7 +1,7 @@ # npm ls > Print installed packages to `stdout`. -> More information: . +> More information: . - Print all versions of direct dependencies to `stdout`: diff --git a/pages/common/npm-name.md b/pages/common/npm-name.md index 964f929957..7b2e7b3873 100644 --- a/pages/common/npm-name.md +++ b/pages/common/npm-name.md @@ -1,4 +1,4 @@ -# npm name +# npm-name > Check whether a package or organization name is available on npm. > More information: . diff --git a/pages/common/npm-org.md b/pages/common/npm-org.md index c09fa322f5..735a197f1b 100644 --- a/pages/common/npm-org.md +++ b/pages/common/npm-org.md @@ -1,7 +1,7 @@ # npm org > Manage organizations. -> More information: . +> More information: . - Add a new user to an organization: diff --git a/pages/common/npm-outdated.md b/pages/common/npm-outdated.md index 391ca1b567..2edd30ef8b 100644 --- a/pages/common/npm-outdated.md +++ b/pages/common/npm-outdated.md @@ -1,7 +1,7 @@ # npm outdated > Check for outdated npm package dependencies. -> More information: . +> More information: . - Find packages that are outdated in a project: diff --git a/pages/common/npm-owner.md b/pages/common/npm-owner.md index 55138af952..40c3478f43 100644 --- a/pages/common/npm-owner.md +++ b/pages/common/npm-owner.md @@ -1,7 +1,7 @@ # npm owner > Manage ownership of published packages. -> More information: . +> More information: . - Add a new user as a maintainer of a package: diff --git a/pages/common/npm-query.md b/pages/common/npm-query.md index 4c795f8236..cf3e85e2c6 100644 --- a/pages/common/npm-query.md +++ b/pages/common/npm-query.md @@ -1,7 +1,7 @@ # npm query > Print an array of dependency objects using CSS-like selectors. -> More information: . +> More information: . - Print direct dependencies: diff --git a/pages/common/npm-root.md b/pages/common/npm-root.md index 4f2d9278e4..f6d5a4f936 100644 --- a/pages/common/npm-root.md +++ b/pages/common/npm-root.md @@ -1,7 +1,7 @@ # npm root > Display path to `node_modules` directory. -> More information: . +> More information: . - Display path to the local `node_modules` directory: diff --git a/pages/common/npm-run.md b/pages/common/npm-run.md index 7abc9657ac..37f89d5529 100644 --- a/pages/common/npm-run.md +++ b/pages/common/npm-run.md @@ -1,7 +1,7 @@ # npm run > Run a script. -> More information: . +> More information: . - Run a script: @@ -25,4 +25,4 @@ - Run a script named `test`: -`npm test` +`npm {{[t|test]}}` diff --git a/pages/common/npm-search.md b/pages/common/npm-search.md index 2172fac5eb..cf52e4388f 100644 --- a/pages/common/npm-search.md +++ b/pages/common/npm-search.md @@ -1,28 +1,28 @@ # npm search > Search for packages in the `npm` registry. -> More information: . +> More information: . - Search for a package by name: -`npm search {{package}}` +`npm {{[s|search]}} {{package}}` - Search for packages by a specific keyword: -`npm search {{keyword}}` +`npm {{[s|search]}} {{keyword}}` - Search for packages, including detailed information (e.g., description, author, version): -`npm search {{package}} --long` +`npm {{[s|search]}} {{package}} --long` - Search for packages maintained by a specific author: -`npm search --author {{author}}` +`npm {{[s|search]}} --author {{author}}` - Search for packages with a specific organization: -`npm search --scope {{organization}}` +`npm {{[s|search]}} --scope {{organization}}` - Search for packages with a specific combination of terms: -`npm search {{term1 term2 ...}}` +`npm {{[s|search]}} {{term1 term2 ...}}` diff --git a/pages/common/npm-star.md b/pages/common/npm-star.md index 97b48da8de..6641da3415 100644 --- a/pages/common/npm-star.md +++ b/pages/common/npm-star.md @@ -1,7 +1,7 @@ # npm star > Mark a package as favorite. -> More information: . +> More information: . - Star a public package from the default registry: diff --git a/pages/common/npm-team.md b/pages/common/npm-team.md index 25441f3db2..a951ee8954 100644 --- a/pages/common/npm-team.md +++ b/pages/common/npm-team.md @@ -1,7 +1,7 @@ # npm team > Manage teams in an organization on the `npm` registry. -> More information: . +> More information: . - Add a user to a team in an organization: diff --git a/pages/common/npm-token.md b/pages/common/npm-token.md index 7807368555..e9871bafd0 100644 --- a/pages/common/npm-token.md +++ b/pages/common/npm-token.md @@ -1,7 +1,7 @@ # npm token > Manage and generate authentication tokens for the npm registry. -> More information: . +> More information: . - Create a new authentication token: diff --git a/pages/common/npm-uninstall.md b/pages/common/npm-uninstall.md index 3cd36c2083..afdf48800e 100644 --- a/pages/common/npm-uninstall.md +++ b/pages/common/npm-uninstall.md @@ -1,16 +1,16 @@ # npm uninstall > Remove a package. -> More information: . +> More information: . - Remove a package from the current project: -`npm uninstall {{package_name}}` +`npm {{[r|uninstall]}} {{package_name}}` - Remove a package globally: -`npm uninstall {{[-g|--global]}} {{package_name}}` +`npm {{[r|uninstall]}} {{[-g|--global]}} {{package_name}}` - Remove multiple packages at once: -`npm uninstall {{package_name1 package_name2 ...}}` +`npm {{[r|uninstall]}} {{package_name1 package_name2 ...}}` diff --git a/pages/common/npm-unpublish.md b/pages/common/npm-unpublish.md index b83152e2f8..8548699c38 100644 --- a/pages/common/npm-unpublish.md +++ b/pages/common/npm-unpublish.md @@ -1,7 +1,7 @@ # npm unpublish > Remove a package from the npm registry. -> More information: . +> More information: . - Unpublish a specific package version: diff --git a/pages/common/npm-unstar.md b/pages/common/npm-unstar.md index 7f81c2fcab..dc75fc0371 100644 --- a/pages/common/npm-unstar.md +++ b/pages/common/npm-unstar.md @@ -1,7 +1,7 @@ # npm unstar > Remove the favorite/star mark from a package. -> More information: . +> More information: . - Unstar a public package from the default registry: diff --git a/pages/common/npm-update.md b/pages/common/npm-update.md index 71601a0085..fed3cbf0fb 100644 --- a/pages/common/npm-update.md +++ b/pages/common/npm-update.md @@ -1,20 +1,20 @@ # npm update > Update packages in the current project. -> More information: . +> More information: . - Update all packages in the current project: -`npm update` +`npm {{[up|update]}}` - Update a specific package in the current project: -`npm update {{package}}` +`npm {{[up|update]}} {{package}}` - Update a package globally: -`npm update {{[-g|--global]}} {{package}}` +`npm {{[up|update]}} {{[-g|--global]}} {{package}}` - Update multiple packages at once: -`npm update {{package1 package2 ...}}` +`npm {{[up|update]}} {{package1 package2 ...}}` diff --git a/pages/common/npm-version.md b/pages/common/npm-version.md index e12b67e215..39d012efae 100644 --- a/pages/common/npm-version.md +++ b/pages/common/npm-version.md @@ -1,7 +1,7 @@ # npm version > Bump a node package version. -> More information: . +> More information: . - Check current version: diff --git a/pages/common/npm-view.md b/pages/common/npm-view.md index fb9218ad19..595205915f 100644 --- a/pages/common/npm-view.md +++ b/pages/common/npm-view.md @@ -1,32 +1,32 @@ # npm view > View registry information about a package. -> More information: . +> More information: . - View information about the latest version of a package: -`npm view {{package}}` +`npm {{[v|view]}} {{package}}` - View information about a specific version of a package: -`npm view {{package}}@{{version}}` +`npm {{[v|view]}} {{package}}@{{version}}` - View all available versions of a package: -`npm view {{package}} versions` +`npm {{[v|view]}} {{package}} versions` - View the description of a package: -`npm view {{package}} description` +`npm {{[v|view]}} {{package}} description` - View the dependencies of the latest version of a package: -`npm view {{package}} dependencies` +`npm {{[v|view]}} {{package}} dependencies` - View the repository URL of a package: -`npm view {{package}} repository` +`npm {{[v|view]}} {{package}} repository` - View the maintainers of a package: -`npm view {{package}} maintainers` +`npm {{[v|view]}} {{package}} maintainers` diff --git a/pages/common/npm-why.md b/pages/common/npm-why.md index 2b68f59119..19d8b221b0 100644 --- a/pages/common/npm-why.md +++ b/pages/common/npm-why.md @@ -1,4 +1,4 @@ -# npm why +# npm-why > Identifies why an npm package is installed. > More information: . diff --git a/pages/common/npm.md b/pages/common/npm.md index c44b46de12..a449ed7734 100644 --- a/pages/common/npm.md +++ b/pages/common/npm.md @@ -2,7 +2,7 @@ > JavaScript and Node.js package manager. > Manage Node.js projects and their module dependencies. -> More information: . +> More information: . - Create a `package.json` file with default values (omit `--yes` to do it interactively): @@ -10,28 +10,28 @@ - Download all the packages listed as dependencies in `package.json`: -`npm install` +`npm {{[i|install]}}` - Download a specific version of a package and add it to the list of dependencies in `package.json`: -`npm install {{package_name}}@{{version}}` +`npm {{[i|install]}} {{package_name}}@{{version}}` - Download the latest version of a package and add it to the list of dev dependencies in `package.json`: -`npm install {{package_name}} {{[-D|--save-dev]}}` +`npm {{[i|install]}} {{package_name}} {{[-D|--save-dev]}}` - Download the latest version of a package and install it globally: -`npm install {{[-g|--global]}} {{package_name}}` +`npm {{[i|install]}} {{[-g|--global]}} {{package_name}}` - Uninstall a package and remove it from the list of dependencies in `package.json`: -`npm uninstall {{package_name}}` +`npm {{[r|uninstall]}} {{package_name}}` - List all locally installed dependencies: -`npm list` +`npm {{[ls|list]}}` - List all top-level globally installed packages: -`npm list {{[-g|--global]}} --depth {{0}}` +`npm {{[ls|list]}} {{[-g|--global]}} --depth {{0}}`