What is Yarn?
Yes, that's all you need to know about Yarn. Let's learn the basic commands of Yarn, open your terminal and let’s go!
yarn -v - to check the version of yarn.
yarn help - to get help on Yarn commands or know more commands.
yarn init - To create a package.json file for a new or existing project.
yarn add ‘package name’ - To install a package and add it to the dependencies in package.json.
yarn remove ‘package name’ - To remove a package from the dependencies in package.json.
yarn install - will install all the dependencies listed in the package.json file.
yarn outdated - to find the outdated versions of dependencies
yarn upgrade ‘package name’ - to upgrade the package
yarn global add ‘package name’ - to install the package globally
yarn list - to list all packages installed in your project.
yarn import - imports yarn.lock if deleted
yarn run dev - to run development scripts
yarn licenses list - to check the licenses of packages
yarn pack - creates a g-zip file of the package
yarn cache list - to see the cache list
yarn cache clean - to clean the cache
yarn run build - bundles the app into static files for production