Install dependencies

1
npm install => yarn 

Install a package

1
npm install [package_name] => yarn add [package_name]

Install a package globally

1
npm install -g [package_name] => yarn global add [package_name]

Install a package as a development dependency

1
npm install --save-dev [package_name] => yarn add --dev [package_name]

Uninstall a package

1
npm uninstall [package_name] => yarn remove [package_name]

Uninstall a package globally

1
npm uninstall -g [package_name] => yarn global remove [package_name]

Uninstall a development dependency package

1
npm uninstall --save-dev [package_name] => yarn remove [package_name]

Update the dependencies

1
npm update => yarn upgrade 

Update a package

1
npm update [package_name] => yarn upgrade [package_name]

Create a new package

1
npm init => yarn init

Run a script defined in the package.json

1
npm run => yarn run

Test a package

1
npm test => yarn test

Publish a package

1
npm publish => yarn publish

Remove all data from the cache

1
npm cache clean => yarn cache clean