ajhsu / blog

The external storage of my brain.
3 stars 0 forks source link

NPM v.s. Yarn #36

Open ajhsu opened 7 years ago

ajhsu commented 7 years ago

The Original Post

This document is a quick note of this post: Yarn vs npm: Everything You Need to Know by Tim Severien

Functional Differences

CLI Differences

Command Equivalents

Featured Commands

For example:

ajhsu$ yarn why ajv
yarn why v1.2.1
[1/4] 🤔  Why do we have the module "ajv"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
info Has been hoisted to "ajv"
info Reasons this module exists
   - "node-sass#request#har-validator" depends on it
   - "webpack" depends on it
info Disk size without dependencies: "380MB"
info Disk size with unique dependencies: "576MB"
info Disk size with transitive dependencies: "612MB"
info Number of shared dependencies: 4
✨  Done in 0.92s.