当前位置:网站首页>pnpm: Introduction

pnpm: Introduction

2022-08-02 08:37:00 m0_67401499

I. Concept

performant npm , which means "performant npm".pnpm is derived from npm/yarn, which solves potential bugs in npm/yarn, greatly optimizes performance, and expands usage scenarios.Known as "the most advanced package management tool"

Second, Features:

Fast speed, save disk space, support monorepo, high security

Compared with yarn/npm, the two commonly used package management tools, pnpm has also greatly improved in performance. According to the current official benchmark data, it can be seen that it is faster than npm/yarn in some comprehensive scenarios.double.

Three, storage management:

Address by content, use symlink

Fourth, dependency management:

npm1, npm2 adopt recursive management, npm3, npm3+, yarn dependency flat management eliminates dependency promotion.

pnpm Dependency Strategy: Eliminate Dependency Promotion, Standardize Topology

V. Safety

When using npm/yarn before, due to the flat structure of node_module, if A depends on B and B depends on C, then A can directly use C, but the problem is that A does not declare C as a dependency.Therefore, this kind of illegal access occurs.However, pnpm has created a set of dependency management methods, which solves this problem well and ensures security.

Six. Installation:

npm i pnpm -g

7. View version information:

Eighth, upgrade version

pnpm add -g pnpm to update

Nine, set the source:

pnpm config get registry //View source

pnpm config set registry https://registry.npmmirror.com //Switch Taobao source

X. Installation project dependencies

pnpm install

Eleven. Running the project

pnpm run dev

Twelve, reference links:

Fast, disk space efficient package manager | pnpm official website

Baidu Security Verification

pnpm brief introduction_A small cabbage~'s blog-CSDN blog_pnpm

pnpm tutorial_Xiao Shen Yue's blog - CSDN blog _pnpm use

Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials

原网站

版权声明
本文为[m0_67401499]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/214/202208020802463169.html