w3resource

Getting Started with Yarn: A Beginner's Guide


The tutorial you are about to read is the first tutorial for a series on yarn.

What is yarn.

Yarn is a package manage you can use for your code. it enables you to use and share your code with other developers around the world. Yarn will do this quickly, securely and reliably such that you don't ever have to worry.

Why yarn

Yarn enables you to use the solutions created by other developers. It makes it easier for you to develop your software.

In the event that you encounter a problem, you can report the issues or contribute back, and then you can use yarn to keep it up to date when the problem is fixed.

Your codes will be shard through something that is called a package (sometimes this is referred to as a module). Typically, a package will contain the code that is being shared as well as a package.json file which will describe the package.

Yarn installation

For you to work with yarn, you will need to install it first. Ensure that you use a stable version of yarn for your operating system. Once this is done. You can now open your command prompt or terminal and type:

 yarn - - version 

This will show you the version of yarn you installed else, it will throw a command not registered error. Check that yarn is contained in your path.

Installing yarn is the first step to working with yarn, it enables you to create a yarn project, migrate from npm, if you want to create a yarn project you need to run yarn init.

Later on in this series you will create your own yarn package and publish it.

create your own yarn package and publish

Then you can add and manage dependencies, set up version control and continuous integration etc.

Next: Comprehensive Guide to Yarn Installation on Various OS.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/yarn/getting-started-with-yarn.php