還在用npm作為包管理工具?現在流行yarn了!

7. 查看配置信息

$ yarn config list
還在用npm作為包管理工具?現在流行yarn了!

8. cache 相關命令

Yarn 保存每個包到你文件系統上用戶目錄裡一個全局緩存裡面。yarn cache ls 會列印出每個緩存了的包。

$ yarn cache ls

運行 yarn cache dir 會打印出當前的 yarn 全局緩存在哪裡。

$ yarn cache dir

運行這個命令會清除本地緩存。下次運行 yarn 或 yarn install 將會重新佔用緩存。

$ yarn cache clean

9. 升級 yarn

自動升級最新版本。

$ yarn self-update

指定版本升級。

$ yarn self-update 0.15.1


分享到:


相關文章: