mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-05 02:55:50 +02:00
npm*: simplify more info links, add aliases and fix titles (#17460)
This commit is contained in:
parent
c4c5a7c959
commit
9905701896
34 changed files with 83 additions and 83 deletions
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
- Configure the browser used to open URLs by setting your preferred browser for `npm` commands:
|
- 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:
|
- 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}}`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm cache
|
# npm cache
|
||||||
|
|
||||||
> Manage the npm package cache.
|
> Manage the npm package cache.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-cache>.
|
> More information: <https://docs.npmjs.com/cli/npm-cache>.
|
||||||
|
|
||||||
- Add a specific package to the cache:
|
- Add a specific package to the cache:
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
- Show the cache path:
|
- Show the cache path:
|
||||||
|
|
||||||
`npm config get cache`
|
`npm {{[c|config]}} get cache`
|
||||||
|
|
||||||
- Change the cache path:
|
- Change the cache path:
|
||||||
|
|
||||||
`npm config set cache {{path/to/directory}}`
|
`npm {{[c|config]}} set cache {{path/to/directory}}`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# npm check
|
# npm-check
|
||||||
|
|
||||||
> Check for outdated, incorrect, and unused npm package dependencies.
|
> Check for outdated, incorrect, and unused npm package dependencies.
|
||||||
> More information: <https://github.com/dylang/npm-check>.
|
> More information: <https://github.com/dylang/npm-check>.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Clean install of `npm` project dependencies for automated environments.
|
> Clean install of `npm` project dependencies for automated environments.
|
||||||
> Installs packages based on `package-lock.json` or `npm-shrinkwrap.json`.
|
> Installs packages based on `package-lock.json` or `npm-shrinkwrap.json`.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-ci>.
|
> More information: <https://docs.npmjs.com/cli/npm-ci>.
|
||||||
|
|
||||||
- Install project dependencies from `package-lock.json` or `npm-shrinkwrap.json`:
|
- Install project dependencies from `package-lock.json` or `npm-shrinkwrap.json`:
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
# npm-config
|
# npm config
|
||||||
|
|
||||||
> Manage the `npm` configuration settings.
|
> Manage the `npm` configuration settings.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-config>.
|
> More information: <https://docs.npmjs.com/cli/npm-config>.
|
||||||
|
|
||||||
- Show all configuration settings:
|
- Show all configuration settings:
|
||||||
|
|
||||||
`npm config list`
|
`npm {{[c|config]}} list`
|
||||||
|
|
||||||
- List all configuration settings as `JSON`:
|
- List all configuration settings as `JSON`:
|
||||||
|
|
||||||
`npm config list --json`
|
`npm {{[c|config]}} list --json`
|
||||||
|
|
||||||
- Get the value of a specific configuration key:
|
- 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:
|
- Set a configuration key to a specific value:
|
||||||
|
|
||||||
`npm config set {{key}} {{value}}`
|
`npm {{[c|config]}} set {{key}} {{value}}`
|
||||||
|
|
||||||
- Delete a configuration key:
|
- Delete a configuration key:
|
||||||
|
|
||||||
`npm config delete {{key}}`
|
`npm {{[c|config]}} delete {{key}}`
|
||||||
|
|
||||||
- Edit the global npm configuration file in the default editor:
|
- Edit the global npm configuration file in the default editor:
|
||||||
|
|
||||||
`npm config edit`
|
`npm {{[c|config]}} edit`
|
||||||
|
|
||||||
- Attempt to repair invalid configuration items:
|
- Attempt to repair invalid configuration items:
|
||||||
|
|
||||||
`npm config fix`
|
`npm {{[c|config]}} fix`
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
# npm dedupe
|
# npm dedupe
|
||||||
|
|
||||||
> Reduce duplication in the `node_modules` directory.
|
> Reduce duplication in the `node_modules` directory.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-dedupe>.
|
> More information: <https://docs.npmjs.com/cli/npm-dedupe>.
|
||||||
|
|
||||||
- Deduplicate packages in `node_modules`:
|
- Deduplicate packages in `node_modules`:
|
||||||
|
|
||||||
`npm dedupe`
|
`npm {{[ddp|dedupe]}}`
|
||||||
|
|
||||||
- Follow `package-lock.json` or `npm-shrinkwrap.json` during deduplication:
|
- Follow `package-lock.json` or `npm-shrinkwrap.json` during deduplication:
|
||||||
|
|
||||||
`npm dedupe --lock`
|
`npm {{[ddp|dedupe]}} --lock`
|
||||||
|
|
||||||
- Run deduplication in strict mode:
|
- Run deduplication in strict mode:
|
||||||
|
|
||||||
`npm dedupe --strict`
|
`npm {{[ddp|dedupe]}} --strict`
|
||||||
|
|
||||||
- Skip optional/peer dependencies during deduplication:
|
- Skip optional/peer dependencies during deduplication:
|
||||||
|
|
||||||
`npm dedupe --omit {{optional|peer}}`
|
`npm {{[ddp|dedupe]}} --omit {{optional|peer}}`
|
||||||
|
|
||||||
- Enable detailed logging for troubleshooting:
|
- Enable detailed logging for troubleshooting:
|
||||||
|
|
||||||
`npm dedupe --loglevel verbose`
|
`npm {{[ddp|dedupe]}} --loglevel verbose`
|
||||||
|
|
||||||
- Limit deduplication to a specific package:
|
- Limit deduplication to a specific package:
|
||||||
|
|
||||||
`npm dedupe {{package_name}}`
|
`npm {{[ddp|dedupe]}} {{package_name}}`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm deprecate
|
# npm deprecate
|
||||||
|
|
||||||
> Mark a version or range of versions of an `npm` package as deprecated.
|
> Mark a version or range of versions of an `npm` package as deprecated.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-deprecate/>.
|
> More information: <https://docs.npmjs.com/cli/npm-deprecate/>.
|
||||||
|
|
||||||
- Deprecate a specific version of a package:
|
- Deprecate a specific version of a package:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm doctor
|
# npm doctor
|
||||||
|
|
||||||
> Check the health of the npm environment.
|
> Check the health of the npm environment.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-doctor>.
|
> More information: <https://docs.npmjs.com/cli/npm-doctor>.
|
||||||
|
|
||||||
- Run all default health checks for `npm`:
|
- Run all default health checks for `npm`:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm find-dupes
|
# npm find-dupes
|
||||||
|
|
||||||
> Identify duplicate dependencies in `node_modules`.
|
> Identify duplicate dependencies in `node_modules`.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-find-dupes>.
|
> More information: <https://docs.npmjs.com/cli/npm-find-dupes>.
|
||||||
|
|
||||||
- List all duplicate packages within `node_modules`:
|
- List all duplicate packages within `node_modules`:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm fund
|
# npm fund
|
||||||
|
|
||||||
> Retrieve funding information from packages.
|
> Retrieve funding information from packages.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-fund>.
|
> More information: <https://docs.npmjs.com/cli/npm-fund>.
|
||||||
|
|
||||||
- List dependencies with funding URL for the project in the current directory:
|
- List dependencies with funding URL for the project in the current directory:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm init
|
# npm init
|
||||||
|
|
||||||
> Create a `package.json` file.
|
> Create a `package.json` file.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-init>.
|
> More information: <https://docs.npmjs.com/cli/npm-init>.
|
||||||
|
|
||||||
- Initialize a new package with prompts:
|
- Initialize a new package with prompts:
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
# npm install
|
# npm install
|
||||||
|
|
||||||
> Install Node packages.
|
> Install Node packages.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-install>.
|
> More information: <https://docs.npmjs.com/cli/npm-install>.
|
||||||
|
|
||||||
- Install dependencies listed in `package.json`:
|
- 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`:
|
- 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`:
|
- 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:
|
- Download the latest version of a package and install it globally:
|
||||||
|
|
||||||
`npm install {{[-g|--global]}} {{package_name}}`
|
`npm {{[i|install]}} {{[-g|--global]}} {{package_name}}`
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Log in to a registry user account.
|
> Log in to a registry user account.
|
||||||
> See also: `npm logout` for logging out.
|
> See also: `npm logout` for logging out.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-login>.
|
> More information: <https://docs.npmjs.com/cli/npm-login>.
|
||||||
|
|
||||||
- Log in to a registry user account and save the credentials to the `.npmrc` file:
|
- Log in to a registry user account and save the credentials to the `.npmrc` file:
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> Log out of the registry user account.
|
> Log out of the registry user account.
|
||||||
> See also: `npm login` for logging in.
|
> See also: `npm login` for logging in.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-logout>.
|
> More information: <https://docs.npmjs.com/cli/npm-logout>.
|
||||||
|
|
||||||
- Log out of the registry user account:
|
- Log out of the registry user account:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm ls
|
# npm ls
|
||||||
|
|
||||||
> Print installed packages to `stdout`.
|
> Print installed packages to `stdout`.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-ls>.
|
> More information: <https://docs.npmjs.com/cli/npm-ls>.
|
||||||
|
|
||||||
- Print all versions of direct dependencies to `stdout`:
|
- Print all versions of direct dependencies to `stdout`:
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# npm name
|
# npm-name
|
||||||
|
|
||||||
> Check whether a package or organization name is available on npm.
|
> Check whether a package or organization name is available on npm.
|
||||||
> More information: <https://github.com/sindresorhus/npm-name-cli>.
|
> More information: <https://github.com/sindresorhus/npm-name-cli>.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm org
|
# npm org
|
||||||
|
|
||||||
> Manage organizations.
|
> Manage organizations.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-org>.
|
> More information: <https://docs.npmjs.com/cli/npm-org>.
|
||||||
|
|
||||||
- Add a new user to an organization:
|
- Add a new user to an organization:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm outdated
|
# npm outdated
|
||||||
|
|
||||||
> Check for outdated npm package dependencies.
|
> Check for outdated npm package dependencies.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-outdated>.
|
> More information: <https://docs.npmjs.com/cli/npm-outdated>.
|
||||||
|
|
||||||
- Find packages that are outdated in a project:
|
- Find packages that are outdated in a project:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm owner
|
# npm owner
|
||||||
|
|
||||||
> Manage ownership of published packages.
|
> Manage ownership of published packages.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-owner>.
|
> More information: <https://docs.npmjs.com/cli/npm-owner>.
|
||||||
|
|
||||||
- Add a new user as a maintainer of a package:
|
- Add a new user as a maintainer of a package:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm query
|
# npm query
|
||||||
|
|
||||||
> Print an array of dependency objects using CSS-like selectors.
|
> Print an array of dependency objects using CSS-like selectors.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-query>.
|
> More information: <https://docs.npmjs.com/cli/npm-query>.
|
||||||
|
|
||||||
- Print direct dependencies:
|
- Print direct dependencies:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm root
|
# npm root
|
||||||
|
|
||||||
> Display path to `node_modules` directory.
|
> Display path to `node_modules` directory.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-root>.
|
> More information: <https://docs.npmjs.com/cli/npm-root>.
|
||||||
|
|
||||||
- Display path to the local `node_modules` directory:
|
- Display path to the local `node_modules` directory:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm run
|
# npm run
|
||||||
|
|
||||||
> Run a script.
|
> Run a script.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-run-script>.
|
> More information: <https://docs.npmjs.com/cli/npm-run>.
|
||||||
|
|
||||||
- Run a script:
|
- Run a script:
|
||||||
|
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
|
|
||||||
- Run a script named `test`:
|
- Run a script named `test`:
|
||||||
|
|
||||||
`npm test`
|
`npm {{[t|test]}}`
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
# npm search
|
# npm search
|
||||||
|
|
||||||
> Search for packages in the `npm` registry.
|
> Search for packages in the `npm` registry.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-search>.
|
> More information: <https://docs.npmjs.com/cli/npm-search>.
|
||||||
|
|
||||||
- Search for a package by name:
|
- Search for a package by name:
|
||||||
|
|
||||||
`npm search {{package}}`
|
`npm {{[s|search]}} {{package}}`
|
||||||
|
|
||||||
- Search for packages by a specific keyword:
|
- 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):
|
- 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:
|
- Search for packages maintained by a specific author:
|
||||||
|
|
||||||
`npm search --author {{author}}`
|
`npm {{[s|search]}} --author {{author}}`
|
||||||
|
|
||||||
- Search for packages with a specific organization:
|
- 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:
|
- Search for packages with a specific combination of terms:
|
||||||
|
|
||||||
`npm search {{term1 term2 ...}}`
|
`npm {{[s|search]}} {{term1 term2 ...}}`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm star
|
# npm star
|
||||||
|
|
||||||
> Mark a package as favorite.
|
> Mark a package as favorite.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-star>.
|
> More information: <https://docs.npmjs.com/cli/npm-star>.
|
||||||
|
|
||||||
- Star a public package from the default registry:
|
- Star a public package from the default registry:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm team
|
# npm team
|
||||||
|
|
||||||
> Manage teams in an organization on the `npm` registry.
|
> Manage teams in an organization on the `npm` registry.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-team>.
|
> More information: <https://docs.npmjs.com/cli/npm-team>.
|
||||||
|
|
||||||
- Add a user to a team in an organization:
|
- Add a user to a team in an organization:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm token
|
# npm token
|
||||||
|
|
||||||
> Manage and generate authentication tokens for the npm registry.
|
> Manage and generate authentication tokens for the npm registry.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-token>.
|
> More information: <https://docs.npmjs.com/cli/npm-token>.
|
||||||
|
|
||||||
- Create a new authentication token:
|
- Create a new authentication token:
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
# npm uninstall
|
# npm uninstall
|
||||||
|
|
||||||
> Remove a package.
|
> Remove a package.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-uninstall>.
|
> More information: <https://docs.npmjs.com/cli/npm-uninstall>.
|
||||||
|
|
||||||
- Remove a package from the current project:
|
- Remove a package from the current project:
|
||||||
|
|
||||||
`npm uninstall {{package_name}}`
|
`npm {{[r|uninstall]}} {{package_name}}`
|
||||||
|
|
||||||
- Remove a package globally:
|
- Remove a package globally:
|
||||||
|
|
||||||
`npm uninstall {{[-g|--global]}} {{package_name}}`
|
`npm {{[r|uninstall]}} {{[-g|--global]}} {{package_name}}`
|
||||||
|
|
||||||
- Remove multiple packages at once:
|
- Remove multiple packages at once:
|
||||||
|
|
||||||
`npm uninstall {{package_name1 package_name2 ...}}`
|
`npm {{[r|uninstall]}} {{package_name1 package_name2 ...}}`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm unpublish
|
# npm unpublish
|
||||||
|
|
||||||
> Remove a package from the npm registry.
|
> Remove a package from the npm registry.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-unpublish>.
|
> More information: <https://docs.npmjs.com/cli/npm-unpublish>.
|
||||||
|
|
||||||
- Unpublish a specific package version:
|
- Unpublish a specific package version:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm unstar
|
# npm unstar
|
||||||
|
|
||||||
> Remove the favorite/star mark from a package.
|
> Remove the favorite/star mark from a package.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-unstar>.
|
> More information: <https://docs.npmjs.com/cli/npm-unstar>.
|
||||||
|
|
||||||
- Unstar a public package from the default registry:
|
- Unstar a public package from the default registry:
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
# npm update
|
# npm update
|
||||||
|
|
||||||
> Update packages in the current project.
|
> Update packages in the current project.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-update>.
|
> More information: <https://docs.npmjs.com/cli/npm-update>.
|
||||||
|
|
||||||
- Update all packages in the current project:
|
- Update all packages in the current project:
|
||||||
|
|
||||||
`npm update`
|
`npm {{[up|update]}}`
|
||||||
|
|
||||||
- Update a specific package in the current project:
|
- Update a specific package in the current project:
|
||||||
|
|
||||||
`npm update {{package}}`
|
`npm {{[up|update]}} {{package}}`
|
||||||
|
|
||||||
- Update a package globally:
|
- Update a package globally:
|
||||||
|
|
||||||
`npm update {{[-g|--global]}} {{package}}`
|
`npm {{[up|update]}} {{[-g|--global]}} {{package}}`
|
||||||
|
|
||||||
- Update multiple packages at once:
|
- Update multiple packages at once:
|
||||||
|
|
||||||
`npm update {{package1 package2 ...}}`
|
`npm {{[up|update]}} {{package1 package2 ...}}`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# npm version
|
# npm version
|
||||||
|
|
||||||
> Bump a node package version.
|
> Bump a node package version.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-version>.
|
> More information: <https://docs.npmjs.com/cli/npm-version>.
|
||||||
|
|
||||||
- Check current version:
|
- Check current version:
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
# npm view
|
# npm view
|
||||||
|
|
||||||
> View registry information about a package.
|
> View registry information about a package.
|
||||||
> More information: <https://docs.npmjs.com/cli/commands/npm-view>.
|
> More information: <https://docs.npmjs.com/cli/npm-view>.
|
||||||
|
|
||||||
- View information about the latest version of a package:
|
- 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:
|
- 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:
|
- View all available versions of a package:
|
||||||
|
|
||||||
`npm view {{package}} versions`
|
`npm {{[v|view]}} {{package}} versions`
|
||||||
|
|
||||||
- View the description of a package:
|
- 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:
|
- 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:
|
- View the repository URL of a package:
|
||||||
|
|
||||||
`npm view {{package}} repository`
|
`npm {{[v|view]}} {{package}} repository`
|
||||||
|
|
||||||
- View the maintainers of a package:
|
- View the maintainers of a package:
|
||||||
|
|
||||||
`npm view {{package}} maintainers`
|
`npm {{[v|view]}} {{package}} maintainers`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# npm why
|
# npm-why
|
||||||
|
|
||||||
> Identifies why an npm package is installed.
|
> Identifies why an npm package is installed.
|
||||||
> More information: <https://github.com/amio/npm-why>.
|
> More information: <https://github.com/amio/npm-why>.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> JavaScript and Node.js package manager.
|
> JavaScript and Node.js package manager.
|
||||||
> Manage Node.js projects and their module dependencies.
|
> Manage Node.js projects and their module dependencies.
|
||||||
> More information: <https://www.npmjs.com>.
|
> More information: <https://docs.npmjs.com/cli/npm>.
|
||||||
|
|
||||||
- Create a `package.json` file with default values (omit `--yes` to do it interactively):
|
- 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`:
|
- 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`:
|
- 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`:
|
- 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:
|
- 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`:
|
- 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:
|
- List all locally installed dependencies:
|
||||||
|
|
||||||
`npm list`
|
`npm {{[ls|list]}}`
|
||||||
|
|
||||||
- List all top-level globally installed packages:
|
- List all top-level globally installed packages:
|
||||||
|
|
||||||
`npm list {{[-g|--global]}} --depth {{0}}`
|
`npm {{[ls|list]}} {{[-g|--global]}} --depth {{0}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue