Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semihkeskindev/1e49bb610299637b039e3a08704df708 to your computer and use it in GitHub Desktop.
Save semihkeskindev/1e49bb610299637b039e3a08704df708 to your computer and use it in GitHub Desktop.
npm vs yarn command translation cheat sheet
title subtitle author date source
npm vs Yarn Command Translation Cheat Sheet
CLI commands comparison
yarn
February 15, 2020

npm vs Yarn Command Translation Cheat Sheet

npm Yarn
npm init yarn init
npm install yarn install
(N/A) yarn install --flat
(N/A) yarn install --har
(N/A) yarn install --no-lockfile
(N/A) yarn install --pure-lockfile
npm install [package] (N/A)
npm install --save [package] yarn add [package]
npm install --save-dev [package] yarn add [package] --dev
(N/A) yarn add [package] --peer
npm install --save-optional [package] yarn add [package] --optional
npm install --save-exact [package] yarn add [package] --exact
(N/A) yarn add [package] --tilde
npm install --global [package] yarn global add [package]
npm update --global yarn global upgrade
npm rebuild yarn add --force
npm uninstall [package] (N/A)
npm uninstall --save [package] yarn remove [package]
npm uninstall --save-dev [package] yarn remove [package]
npm uninstall --save-optional [package] yarn remove [package]
npm cache clean yarn cache clean
rm -rf node_modules && npm install yarn upgrade
npm version major yarn version --major
npm version minor yarn version --minor
npm version patch yarn version --patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment