Cheatography
https://cheatography.com
Links
Install Yarn |
|
Documentation |
|
Get version of Yarn Installed |
yarn --version |
Migrating from npm
Run first in your project directory on the command line. |
yarn |
Change Angular CLI to use yarn |
ng set --global packageManager=yarn |
Install Packages
Install a package, update the package.json and yarn.lock files |
yarn add <package-name> |
Install a specific version of a package, update the package.json and yarn.lock files |
yarn add <package-name>@<version-number> |
Install to dev dependencies |
yarn add <package-name> --dev |
Install a package globally |
yarn global add <package-name> |
Get the global cache directory |
yarn cache dir |
Restore Packages defined in package.json |
yarn install |
Uninstall Packages
Uninstall, remove from package.json, remove from yarn.lock |
yarn remove <package-name> |
Uninstall a global package |
yarn global remove <package-name> |
Clean from the yarn cache |
yarn cache clean |
List Packages
List packages used by your application with no dependencies |
yarn list --depth 0 |
List packages used by your application with dependencies |
yarn list |
List packages installed globally |
yarn global ls |
Get info about a package |
yarn info <package-name> |
Why is a package needed? |
yarn why <package-name> |
Verify Packages
Verify package dependencies |
yarn check |
Verify package check sums |
yarn check --integrity |
Upgrading Packages
Show outdated packages |
yarn outdated |
Upgrade a package to the latest version |
yarn upgrade <package-name> |
Upgrade a package to a specific version |
yarn upgrade <package-name>@<version-number> |
Upgrade a global package |
yarn global upgrade <package-name> |
Proxy - escape special characters
yarn config set proxy http://username:password@yourproxyserver:8080/ |
yarn config set https-proxy http://username:password@yourproxyserver:8080/ |
|
Created By
www.kellermansoftware.com
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by GregFinzer