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
  • downloads dependencies
  • yarn uses yarn.lock for build consistency
  • yarn uses a cache to speed up repeat installs
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

Popular posts from this blog

Serve create-react-app from a subdirectory

Google sign-in with pwa_auth

Components in React: "class" and "functional"