From 5ba22052b74d11926b66444e53014e5c74630fe1 Mon Sep 17 00:00:00 2001 From: UnButtun <79936503+Unbuttun@users.noreply.github.com> Date: Mon, 3 May 2021 21:26:31 +0530 Subject: [PATCH] pnpm, pnpx: add page (#5863) --- pages/common/pnpm.md | 37 +++++++++++++++++++++++++++++++++++++ pages/common/pnpx.md | 16 ++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 pages/common/pnpm.md create mode 100644 pages/common/pnpx.md diff --git a/pages/common/pnpm.md b/pages/common/pnpm.md new file mode 100644 index 0000000000..0f3aaa967f --- /dev/null +++ b/pages/common/pnpm.md @@ -0,0 +1,37 @@ +# pnpm + +> Fast, disk space efficient package manager for Node.js. +> Manage Node.js projects and their module dependencies. +> More information: . + +- Interactively create a `package.json` file: + +`pnpm init` + +- Download all the packages listed as dependencies in `package.json`: + +`pnpm install` + +- Download a specific version of a package and add it to the list of dependencies in `package.json`: + +`pnpm install {{module_name}}@{{version}}` + +- Download a package and add it to the list of dev dependencies in `package.json`: + +`pnpm install --dev {{module_name}}` + +- Download a package and install it globally: + +`pnpm install -g {{module_name}}` + +- Uninstall a package and remove it from the list of dependencies in `package.json`: + +`pnpm uninstall {{module_name}}` + +- Print a tree of locally installed modules: + +`pnpm list` + +- List top-level [g]lobally installed modules: + +`pnpm list -g --depth={{0}}` diff --git a/pages/common/pnpx.md b/pages/common/pnpx.md new file mode 100644 index 0000000000..21231ed4fc --- /dev/null +++ b/pages/common/pnpx.md @@ -0,0 +1,16 @@ +# pnpx + +> Directly execute binaries from npm packages, using `pnpm` instead of `npm`. +> More information: . + +- Execute the binary from a given npm module: + +`pnpx {{module_name}}` + +- Execute a specific binary from a given npm module, in case the module has multiple binaries: + +`pnpx --package {{package_name}} {{module_name}}` + +- Display help: + +`pnpx --help`