From npm to yarn
Here are some notes from watching Yarn - An npm Alternative by Andrew Mead
Install yarn using npm install -g yarn
Comparable npm and yarn commands:
| npm | yarn | notes |
|---|---|---|
| npm init | yarn init | creates package.json file |
| npm install | yarn add |
|
| npm install -g npm-check-updates; ncu | yarn outdated | reports on available updates in dependencies |
| yarn upgrade | updates dependencies | |
| yarn cache clean | empites library cache | |
| yarn run | asks script to run | |
| npm install -g pkg | yarn global add pkg | adds a system wide package (global) |
See also: Yarn Cheatsheet
