包管理工具命令对应表

命令对应表

npm yarn pnpm 作用
npm install npm  i yarn pnpm i  安装
npm install XXX --global npm i XXX -g yarn global add XXX pnpm i / add XXX -g 全局安装
npm install XXX @y.y.y npm i XXX @y.y.y yarn add XXX @y.y.y pnpm i / add  XXX @y.y.y 安装指定版本
npm install XXX --save npm i XXX -S yarn add XXX pnpm add XXX -S 生产模式安装包
npm install XXX --save-dev npm i XXX -D yarn add XXX --dev pnpm add XXX -D 开发模式安装包
npm uninstall XXX --save yarn remove XXX pnpm remove XXX 卸载
npm update  --save yarn update pnpm upgrade 更新
npm --version yarn --version pnpm --version 查看版本
npm config get registry yarn config get registry pnpm config get registry 查看镜像源
npm config set registry https://registry.npm.taobao.org yarn config set registry https://registry.npm.taobao.org pnpm config set registry https://registry.npm.taobao.org 设置镜像源

 

posted @ 2021-02-20 16:32  simonalwayson  阅读(49)  评论(0)    收藏  举报