- Fast, disk space efficient package manager | pnpm
Strict pnpm creates a non-flat node_modules by default, so code has no access to arbitrary packages
- Installation - pnpm
pnpm is an ordinary version of pnpm, which needs Node js to run @pnpm exe is packaged with Node js into an executable, so it may be used on a system with no Node js installed
- Motivation - pnpm
With pnpm, the dependency will be stored in a content-addressable store, so: If you depend on different versions of the dependency, only the files that differ are added to the store
- pnpm install
Inside a workspace, pnpm install installs all dependencies in all the projects If you want to disable this behavior, set the recursive-install setting to false
- Workspace - pnpm
pnpm has built-in support for monorepositories (AKA multi-package repositories, multi-project repositories, or monolithic repositories) You can create a workspace to unite multiple projects inside a single repository
- pnpm vs npm
On the other hand, pnpm manages node_modules by using hard linking and symbolic linking to a global on-disk content-addressable store This lets you get the benefits of far less disk space usage, while also keeping your node_modules clean
- Settings (pnpm-workspace. yaml)
Specifies which exact Node js version should be used for the project's runtime pnpm will automatically install the specified version of Node js and use it for running pnpm run commands or the pnpm node command
- 安装 - pnpm
pnpm 是 pnpm 的普通版本,需要 Node js 才能运行。 @pnpm exe 与 Node js 一起打包成可执行文件,因此它可以在没有安装 Node js 的系统上使用。
|