yarn了解一下

191 阅读1分钟
yarn config set registry https://registry.npm.taobao.org

Yarn 常用命令

npm install === yarn —— install安装是默认行为

npm install taco --save === yarn add taco —— taco包立即被保存到 package.json 中。

npm uninstall taco --save === yarn remove taco

npm install taco --save-dev === yarn add taco --dev

npm update --save === yarn upgrade

npm install taco@latest --save === yarn add taco

npm install taco --global === yarn global add taco —— 一如既往,请谨慎使用 global 标记。

注意:使用yarn或yarn install安装全部依赖时是根据package.json里的"dependencies"字段来决定的

npm init === yarn init

npm init --yes/-y === yarn init --yes/-y

npm link === yarn link

npm outdated === yarn outdated

npm publish === yarn publish

npm run === yarn run

npm cache clean === yarn cache clean

npm login === yarn login

npm test === yarn test

———————————————— 版权声明:本文为CSDN博主「Never Yu丶」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:blog.csdn.net/csdn_yudong…