yarn basic
Contents
yarn basic
commands
|
|
Yarn 是什么?
“Yarn 是由 Facebook、Google、Exponent 和 Tilde 联合推出了一个新的 JS 包管理工具, 正如官方文档中写的, Yarn 是为了弥补 npm 的一些缺陷而出现的。
build
|
|
npm, yarn 命令对照
https://classic.yarnpkg.com/zh-Hans/docs/migrating-from-npm/
npm 命令简写
https://www.jianshu.com/p/455f74669ce9
|
|
|
|
打印依赖树
|
|
更新某个包的版本
|
|
yarn 国内加速, 修改镜像源
以下命令查看当前使用的镜像源
yarn config get registry
临时修改
|
|
全局修改
|
|
yarn add @angular-devkit/build-angular –dev
debian install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo “deb https://dl.yarnpkg.com/debian/ stable main” | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn
https://yarnpkg.com/zh-Hans/docs/install#debian-stable
archlinux
sudo pacman -S yarn
查看版本
|
|
https://my.oschina.net/jiangxinxin/blog/775326
yarn vs npm
yarn init private means adding a private: true field in the autogenerated package.json, which will instruct npm to refuse publishing the package to the public NPM registry on npm publish.
http://web.jobbole.com/88459/embed/#?secret=X3bbWZCgiD https://learnku.com/articles/15976/yarn-accelerate-and-modify-mirror-source-in-china https://stackoverflow.com/questions/51209962/whats-the-private-flag-yarn-init
Author -
LastMod 2017-09-30