当前位置:网站首页>Installation and use of pnpm
Installation and use of pnpm
2022-07-29 00:20:00 【web18484626332】
The original intention of the project
When using npm or Yarn when , If you have 100 A project uses a dependency (dependency), There will be 100 A copy of this dependency is saved on the hard disk . But in the use of pnpm when , Dependencies are stored in content addressable storage , therefore :
- If you use different versions of a dependency , Only different versions of files will be added to the warehouse . for example , If a package has 100 File , And its new version only changes 1 File . that pnpm update Only additional... Will be added to the storage center 1 A new document , Instead of copying the contents of the new version package just because of the change of one file .
- All files will be stored in a location on the hard disk . When the package is installed , The files in the package will be hard linked to this location , Without taking up additional disk space . This allows you to share the same version of dependencies across projects .
therefore , You save a lot of space on disk , This is proportional to the number of projects and dependencies , And the installation speed is much faster !
install
Use stand-alone scripts
stay Windows Next ( Use PowerShell):
iwr https://get.pnpm.io/install.ps1 -useb | iex
adopt npm install
npm install -g pnpm
to update
pnpm update -g pnpm
CLI command
command
meaning
pnpm add
Install package to dependencies
pnpm add -D
Install package to devDependencies
pnpm add -g
Global installation package
pnpm install or pnpm i
Download all project dependencies
pnpm update or pnpm up
follow package.json Updates all dependencies within the specified range
pnpm update -g
Update a dependent package from the global
pnpm remove
From the project package.json Delete related dependencies from
pnpm remove -D
Delete only the development environment devDependencies Dependencies in
pnpm remove -g
Delete a dependent package from the global
pnpm run
Run script
边栏推荐
- Do like and in indexes in MySQL go
- MySQL installation and configuration tutorial (super detailed, nanny level)
- Detailed explanation of 9 common reasons for MySQL index failure
- Software designer - intermediate, exam summary
- Multimodal model sketch (1)
- With this, your messages can't be monitored
- Opencv macro definition
- Servlet运行原理_API详解_请求响应构造进阶之路(Servlet_2)
- Advanced area of attack and defense world web masters ics-06
- vulnhub:Sar
猜你喜欢

Attack and defense world web master advanced area web_ php_ unserialize

Advanced area of attack and defense world web masters training www robots

【C】 Introduction and Simulation Implementation of ATOI and offsetof

flyway的快速入门教程
![[MySQL series] MySQL database foundation](/img/50/cc75b2cdf6e52714c1d492fa1ae2c4.png)
[MySQL series] MySQL database foundation

Sword finger offer 64. find 1+2+... +n, logical operator short circuit effect

Application of Devops in Internet of things solutions

ACM SIGIR 2022 | interpretation of selected papers of meituan technical team

Do like and in indexes in MySQL go

Attack and defense world web master advanced area PHP_ rce
随机推荐
mysql中exists的用法详解
Eye of depth (18) -- partial derivative
JS advanced ES6 ~ es13 new features
Leetcode63. Different paths II
Multimodal model sketch (1)
“Method Not Allowed“,405问题分析及解决
Attack and defense world web master advanced area PHP_ rce
Linux下安装Mysql5.7,超详细完整教程,以及云mysql连接
centos7安装mysql8
Install MySQL using Yum for Linux
[microservice] Nacos cluster building and loading file configuration
Do like and in indexes in MySQL go
跳表的原理
Add build dependency error
[MySQL series] MySQL database foundation
curl (7) Failed connect to localhost8080; Connection refused
"Method not allowed", 405 problem analysis and solution
vscode下链接远程服务器安装插件失败、速度慢等解决方法
Visual full link log tracking
Field injection is not recommended solution