用法
如果你来自 npm,主要变化是:
¥If you're coming from npm, the main changes are:
-
运行
yarn
足以运行安装!它是yarn install
的别名。¥Running
yarn
is enough to run an install! It's an alias toyarn install
. -
使用
yarn add
可以添加或更新对单个包的依赖。¥Adding or updating a dependency to a single package is done with
yarn add
. -
使用
yarn up
升级整个项目的依赖。¥Upgrading a dependency across the whole project is done with
yarn up
. -
你的脚本已别名化。调用
yarn build
与yarn run build
相同!¥Your scripts are aliased. Calling
yarn build
is the same asyarn run build
! -
大多数与注册表相关的命令都移到了
yarn npm
后面(例如:yarn npm audit
)。¥Most registry-related commands are moved behind
yarn npm
(ex:yarn npm audit
).
要查看完整的命令列表,请检查 CLI 参考。
¥To see the full list of commands, check the CLI reference.