yarn is fast, reliable and secure dependency manager
- Installing first time pkg will cache it so that next time it will be faster
- It install multiple packages in parallel which makes it super fast.
- Integertiy verfication using checksums so no corrupt packages.
- File locking like composer and deterministic algorithms for install to maintain dependency order
- We can install packages offline which is not possible in npm
- Unlike npm retry request on failure
- Unlike nesting in npm, yarn uses flat mode and Avoid duplicates by resolving mismatching
- Supported by google and facebook team
Installation on ubuntu require few simple steps
First tweak repository by adding key and repo.
Update and install
Check if successfully installed
Working with yarn is same as working with npm.
Just like npm init we have yarn init and same question and interstingly it uses same package.json
Adding a dependency same as npm like npm install –save [email protected]
We also have nice progress bar and its really fast unlike npm where by enable progress bar installation gets even more slow.
Like npm install here we have