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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM