I upgraded yarn from v1.22.0 to v2.0.0-rc.29. It generated .yarn folder with:
Should I add whole .yarn folder to .gitignore? Or maybe some nested folders in there like .yarn/cache?
Also, what to do with .pnp.js. Do I commit it, or add to .gitignore
yarn/releases should not be in . gitignore . UPD: answer is outdated. Check Q&A section, mentioned above.
json file that provides information to Yarn about your package. Most packages use some kind of version control system. The most common one is git but Yarn doesn't mind whatever one you choose to use.
If you want to remove a specific lib's cache run $ yarn cache dir to get the right yarn cache directory path for your OS, then $ cd to that directory and remove the folder with the name + version of the lib you want to cleanup.
Yarnrc files (named this way because they must be called . yarnrc. yml ) are the one place where you'll be able to configure Yarn's internal settings. While Yarn will automatically find them in the parent directories, they should usually be kept at the root of your project (often your repository).
See the Questions & Answers section of the documentation. It has changed several times, so for the most up to date answer just click that link!
But in the StackOverflow spirit of "no link-only answers" here's a snapshot:
Which files should be gitignored?
If you're using Zero-Installs:
.yarn/* !.yarn/cache !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions
If you're not using Zero-Installs:
.pnp.* .yarn/* !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions
Note that, of the paths you mention, only .yarn/releases
should not be in .gitignore
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With