美文网首页
Yarn | npm 基本用法

Yarn | npm 基本用法

作者: 枫丹白露_9728 | 来源:发表于2020-06-16 09:11 被阅读0次

1)安装

brew install yarn | brew uprade yarn

2)查看版本

yarn -verson

3)初始化

yarn init

4)添加

yarn add [package]
yarn add [package]@[version]
yarn add [package]@[tag]

5)修改

yarn upgrade [package]
yarn upgrade [package]@[version]
yarn upgrade [package]@[tag]

6)移除

yarn remove [package]

7)设置yarn的镜像

yarn config set registry https://registry.npm.taobao.org (原https://registry.yarnpkg.com)
类似的 npm  set registry https://registry.npm.taobao.org 

8)设置yarn的sass二进制源

yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass
类似的 npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass

9)查看当前源

yarn config get registry

相关文章

网友评论

      本文标题:Yarn | npm 基本用法

      本文链接:https://www.haomeiwen.com/subject/yjhlxktx.html