Yarn 常用命令


npm install === yarn —— install安装是默认行为

npm install taco --save === yarn add taco —— taco包立即被保存到 package.json 中。

npm uninstall taco --save === yarn remove taco

npm install taco --save-dev === yarn add taco --dev

npm update --save === yarn upgrade

npm install taco@latest --save === yarn add taco

npm install taco --global === yarn global add taco —— 一如既往,请谨慎使用 global 标记。

注意:使用yarn或yarn install安装全部依赖时是根据package.json里的"dependencies"字段来决定的

npm init === yarn init

npm init --yes/-y === yarn init --yes/-y

npm link === yarn link

npm outdated === yarn outdated

npm publish === yarn publish

npm run === yarn run

npm cache clean === yarn cache clean

npm login === yarn login

npm test === yarn test

Yarn 独有的命令
yarn licenses ls —— 允许你检查依赖的许可信息
yarn licenses generate —— 自动创建依赖免责声明 license
yarn why taco —— 检查为什么会安装 taco,详细列出依赖它的其他包
yarn why vuepress —— 检查为什么会安装 vuepress,详细列出依赖它的其他包
————————————————
版权声明:本文为CSDN博主「Never Yu丶」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/csdn_yudong/article/details/82015885
posted @ 2020-01-03 17:06  佳明兄  阅读(1045)  评论(1编辑  收藏  举报

内容仅为参考使用,不保证内容的正确性,通过使用本博客内容随之而来的风险与作者无关。内容如有侵权,请通知删除!