当前位置:网站首页>Pnpm installation and use

Pnpm installation and use

2022-04-23 14:45:00 Tiangao renniaofei dyz (front end)

pnpm Use

Official website : https://pnpm.js.org/installation/

Global installation

npm install pnpm -g

Set source

// View source 
pnpm config get registry 
// Switch Taobao source 
pnpm config set registry http://registry.npm.taobao.org 

Use

pnpm install  package   // 
pnpm i  package 
pnpm add  package     // -S   Default write dependencies
pnpm add -D    // -D devDependencies
pnpm add -g    //  Global installation 

remove

pnpm remove  package                             // Remove package 
pnpm remove  package  --global                   // Remove global package 

to update

pnpm up                // Update all dependencies 
pnpm upgrade  package         // Update package 
pnpm upgrade  package  --global   // Update global package 

Set storage path

pnpm config set store-dir /path/to/.pnpm-store

personal use

  • Some need node-gyp Remember to install your package

Scripting solutions are prohibited on the system

#  Run as administrator power shell
set-executionpolicy remotesigned

版权声明
本文为[Tiangao renniaofei dyz (front end)]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231426082818.html