初始化一个新项目
yarn init
添加依赖包
yarn add [package]
yarn add [package]@[version]
yarn add [package]@[tag]
安装全局依赖
yarn global add [package]
安装所有依赖
yarn
或者
yarn install
移除依赖包
yarn remove [package]
将依赖项添加到不同依赖项类别中
yarn add [package] --dev
yarn add [package] --peer
yarn add [package] --optional
升级依赖包
yarn upgrade [package]
yarn upgrade [package]@[version]
yarn upgrade [package]@[tag]
网友评论