当前位置:网站首页>Pnpm Brief
Pnpm Brief
2022-07-25 10:09:00 【A cabbage~】
List of articles
What is? pnpm
pnpm yes Node.js Alternative package manager . It is npm A direct alternative to , But faster 、 More efficient .
Why is it more efficient ? When you install the package , We will save it in the global storage on your machine , Then we will create a hard link from it , Instead of copying . For each version of the module , Only one copy remains on the disk . for example , When using npm or yarn when , If you have 100 One use lodash My bag , Then there will be 100 individual lodash copy .pnpm You can save money GB Of disk space !
pnpm advantage
pnpm Have Yarn exceed npm All the additional functions of :
- Security : And yarn equally ,pnpm There is a special file that contains the checksums of all installed packages , Used to verify the integrity of each installed package before executing the code .
- Offline mode : pnpm Send all downloaded packages tarball Save in the local registry image . When the package is available locally , It never makes requests . Use this
--offlineParameters can be completely disabled HTTP request . - Speed : pnpm Not only is better than npm fast , And ratio yarn fast . Whether cold cache or hot cache , It's all better than yarn fast .yarn Copy files from the cache , and pnpm Just link them from global storage .
pnpm install
npm install -g pnpm // adopt npm install
npx pnpm add -g pnpm // adopt npx install
Set source
pnpm config get registry // View source
pnpm config set registry https://registry.npmmirror.com // Switch Taobao source
Add package
pnpm add [package] // Save to dependency
pnpm add -D [package] // Save to devDependencies
pnpm add -O [package] // Save to optionalDependencies
Remove package
pnpm remove [package] // Remove package
pnpm remove [package] --global // Remove global package
Update package
pnpm up // Update all dependencies , comply with package.json The range specified in
pnpm up --latest // Latest update all dependencies , Ignore package.json The range specified in
Set storage path
pnpm config set store-dir /path/to/.pnpm-store
Want to know more see pnpm Official website : https://pnpm.js.org/installation/
边栏推荐
- About student management system (registration, login, student side)
- emmet语法速查 syntax基本语法部分
- 【成长必备】我为什么推荐你写博客?愿你多年以后成为你想成为的样子。
- 手持振弦采集仪对振弦传感器激励方法和激励电压
- Linked list -- basic operation
- Store to-do items locally (improve on to-do items)
- Download and installation of QT 6.2
- 无线中继采集仪的常见问题
- 车辆属性最近一次入库时间初始化生成sql脚本文件
- 无线振弦采集仪的使用常见问题
猜你喜欢

@5-1 CCF 2019-12-1 reporting

CCF 201509-4 Expressway

Configuring ROS development environment with vscode: Causes and solutions to the problem of ineffective code modification

用ESP32+TM1638实验NTP网络校时闹钟的ARDUINO代码

CCF 201512-4 delivery
![腾讯云之错误[100007] this env is not enable anonymous login](/img/a2/a209a0d94e3fbf607242c28d87e2dd.png)
腾讯云之错误[100007] this env is not enable anonymous login

Introduction to armv8 architecture

ARMv8通用定时器简介

C语言基础

【近万字干货】别让你的简历配不上你的才华——手把手教你制作最适合你的简历
随机推荐
[tensorflow2 installation] tensorflow2.3-cpu installation pit avoidance guide!!!
SSM整合(简单的图书管理系统来整合SSM)
数据库MySQL详解
TensorFlow raw_ RNN - implement the seq2seq mode to take the output of the previous time as the input of the next time
一.初始MySQL,MySQL安装、配置环境、初始化
Internal structure of SOC chip
无线振弦采集仪应用工程安全监测
Mlx90640 infrared thermal imaging sensor temperature measurement module development notes (II)
[recommended collection] with these learning methods, I joined the world's top 500 - the "fantastic skills and extravagance" in the Internet age
无线振弦采集仪参数配置工具的设置
小程序分享功能
~2 CCF 2022-03-1 uninitialized warning
CCF 201503-3 Festival
LOAM 融合 IMU 细节之 TransformToEnd 函数
FLASH read / write operation and flash upload file of esp8266
JSP详解
SOC芯片内部结构
MLX90640 红外热成像仪测温模块开发笔记(五)
Store to-do items locally (improve on to-do items)
[nearly 10000 words dry goods] don't let your resume don't match your talent -- teach you to make the most suitable resume by hand