yarn命令和npm命令_npm vs纱线命令备忘单

news/2024/7/4 1:19:48

yarn命令和npm命令

Here’s a cheat sheet you can use as a handy reference for npm & Yarn.

这是一份备忘单,您可以将其用作npm& Yarn的方便参考。

There’s a lot of similarities between npm and Yarn. As the newer technology Yarn (released 2016) drew a lot of inspiration from npm (2010).

npm和Yarn之间有很多相似之处。 随着新技术Yarn (2016年发布)从npm (2010)中汲取了很多灵感。

On the flip-side, their similarities can lead to confusion and silly mistakes if you find yourself using both package managers. Hopefully this cheat sheet will serve as a handy reference! 🐊

另一方面,如果您发现自己同时使用了两个程序包管理器,则它们的相似性可能导致混乱和愚蠢的错误。 希望本备忘单可以为您提供方便的参考! 🐊

npm vs纱 (npm vs Yarn)

Commandnpmyarn
Install dependenciesnpm installyarn
Install packagenpm install [package]yarn add [package]
Install dev packagenpm install --save-dev [package]yarn add --dev [package]
Uninstall packagenpm uninstall [package]yarn remove [package]
Uninstall dev packagenpm uninstall --save-dev [package]yarn remove [package]
Updatenpm updateyarn upgrade
Update packagenpm update [package]yarn upgrade [package]
Global install packagenpm install --global [package]yarn global add [package]
Global uninstall packagenpm uninstall --global [package]yarn global remove [package]
命令 npm
安装依赖 npm install yarn
安装套件 npm install [package] yarn add [package]
安装开发包 npm install --save-dev [package] yarn add --dev [package]
卸载程序包 npm uninstall [package] yarn remove [package]
卸载开发包 npm uninstall --save-dev [package] yarn remove [package]
更新资料 npm update yarn upgrade
更新包 npm update [package] yarn upgrade [package]
全局安装包 npm install --global [package] yarn global add [package]
全局卸载软件包 npm uninstall --global [package] yarn global remove [package]

不变的事情 (Things that Haven’t Changed)

There are some commands that Yarn decided not to change. Here’s a quick breakdown:

Yarn决定不更改某些命令。 快速细分:

npmyarn
npm inityarn init
npm runyarn run
npm testyarn test
npm login (and logout)yarn login (and logout)
npm linkyarn link
npm publishyarn publish
npm cache cleanyarn cache clean
npm
npm init yarn init
npm run yarn run
npm test yarn test
npm login (和logout ) yarn login (和logout )
npm link yarn link
npm publish yarn publish
npm cache clean yarn cache clean

翻译自: https://www.digitalocean.com/community/tutorials/nodejs-npm-yarn-cheatsheet

yarn命令和npm命令


http://www.niftyadmin.cn/n/3649296.html

相关文章

新建项目与数据库搭建

#新建项目与数据库配置 ### 一、新建项目 ### File——Gradle——JAVAWEB——勾选1和2,选择use local gradle distribution ### 二。添加依赖,build.gradle ### dependencies { // Gson json compile com.google.code.gson:gson:2.8.0 …

[EntLib]在SR.Strings中使用中文字符串资源

编写者:郑昀UltraPower要想在SR.Strings中使用中文字符串资源,必须这样:把你的SR.Strings文件保存为UTF-8编码的(具体操作是:VS.Net2003->文件菜单-高级保存选项,选择“Unicode(UTF-8 带签名) - 代码页 65001”)&am…

浅谈Android客户端项目框架

写Android也有些时间了,一边工作,一边学习,一边积累,只有遇到问题了,花时间去研究,自己的能力才能提升,刀如果不用,慢慢的就会生锈应该也是这个道理吧!上个月公司项目服务…

在JavaScript中建立倒数计时器

Countdown timers can serve many purposes. They can communicate to a user how long they’ve been doing something or how much time until some event happens, like the launch of your new website. 倒数计时器可以有多种用途。 他们可以与用户交流他们已经做了多长时间…

RxJava的简单使用(一)

一测试订阅 Test public void testSubscribe() {//观察者&#xff0f;订阅者final Subscriber<String> subscriber new Subscriber<String>() {Overridepublic void onCompleted() {System.out.println("onCompleted in tread:" Thread.currentThread().…

[EntLib]关于SR.Strings的使用办法

编写者&#xff1a;郑昀UltraPower下载附件。安装String Resource Generator 1[1].2.5&#xff0c;运行SRGenerator.msi。然后给自己的工程中添加SR.strings文件&#xff0c;通过VS.NET在现有的.RESX或SR.strings文件设置Custom tool属性为&#xff1a;StringResourceTool或SRC…

android开源项目和框架

特效&#xff1a; http://www.theultimateandroidlibrary.com/ 常用效果&#xff1a; 1. https://github.com/novoda/ImageLoader 异步加载图片&#xff0c;缓存&#xff0c;生成缩略图&#xff0c; 基本上每个应用都会需要这个lib。 android-query框架 2. https://githu…

prisma 风格设置_Prisma中的身份验证-第1部分:设置

prisma 风格设置Unless if you’re using something like Firebase to handle your authentication, it can be a bit tricky to handle it in a way that is both secure and easy to manage. In this three-part series, we’re going to be going over how to setup your Gr…