是伍尚金哇_v

npm 与 yarn 常用命令对比,yarn还是比较方便些

电脑版发表于:2020/3/24 15:13

现在基本上都在用yarn代替npm,管理包比较方便,速度也比较快些,现记录常用命令

作用npm
yarn
安装
npm install(i)
yarn
卸载
npm uninstall(un)
yarn remove
全局安装
npm install xxx –-global(-g)
yarn global add xxx
安装包
npm install xxx –save(-S)
yarn add xxx
开发模式安装包
npm install xxx –save-dev(-D)
yarn add xx -dev(-D)
更新
npm update –save
yarn upgrade
全局更新
npm update –global
yarn global upgrade
卸载
npm uninstall [–save/–save-dev]
yarn remove xxx
清除卸载
npm cache clean
yarn cache clean
更重装
rm -rf node_modules && npm install
yarn upgrade


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢