패시브 스킬

<Yarn> Yarn vs NPM 비교 (특징, 사용법 등)

디벅잉 2022. 2. 19. 12:35
728x90

 

🎯

 

{ "yarn-vs-npm": "^0.1.0" }

#1 특징 (상대적)

## Yarn

장점: 멋 / 빠름 / 안전함 / peerDependencies 관리 / offline 모드 지원

단점: 용량이 큼 / 커뮤니티가 npm에 비해 작음 / 새롭게 추가된 패키지 바로 반영 안됨(?)

## NPM

장점: 따로 설치할 필요 없음

단점: 패키지가 중복으로 설치됨, 느림

 

#2 사용법

## Yarn

설치: $ npm install --global yarn

사용: yarn init / yarn add / yarn add -D / yarn [script name]

## NPM

설치: nope 설치할 때 같이 설치됨

사용: npm init / npm i (npm install) / npm i --save-dev / npm run [script name] (특정 스크립트 run 없이 실행 가능)

 

📌

 

https://classic.yarnpkg.com/lang/en/docs/migrating-from-npm/

 

Yarn

Fast, reliable, and secure dependency management.

classic.yarnpkg.com

https://www.whitesourcesoftware.com/free-developer-tools/blog/npm-vs-yarn-which-should-you-choose/

 

NPM vs. Yarn: Which Package Manager Should You Choose?

We’ll be comparing NPM vs. Yarn side by side so that you can make the right decision on the one to go for when working on your projects.

www.whitesourcesoftware.com

https://www.youtube.com/watch?v=0DGClZD5LEM 

 

728x90