MENU
Yarn
Alexa's Ranking: 17,606
Yarn is an alternative npm client that can be used to download GitHub repositories and NPM packages. At the time of writing, parallel downloads and caching are its main strengths over NPM.
You can use NPM to install it:
npm i –g yarn |
CLI commands comparison
npm (v5) | Yarn |
npm install | yarn add |
(N/A) | yarn add --flat |
(N/A) | yarn add --har |
npm install --no-package-lock | yarn add --no-lockfile |
(N/A) | yarn add --pure-lockfile |
npm install [package] --save | yarn add [package] |
npm install [package] --save-dev | yarn add [package] --dev |
(N/A) | yarn add [package] --peer |
npm install [package] --save-optional | yarn add [package] --optional |
npm install [package] --save-exact | yarn add [package] --exact |
(N/A) | yarn add [package] --tilde |
npm install [package] --global | yarn global add [package] |
npm update --global | yarn global upgrade |
npm rebuild | yarn add --force |
npm uninstall [package] | yarn remove [package] |
npm cache clean | yarn cache clean [package] |
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 |