everydotorg / donate-button

A free donate and p2p fundraising button so nonprofit websites can accept cryptocurrency, stocks, and cash - credit, debit, bank, PayPal, Venmo, Apple Pay, Google Pay.
https://www.every.org
MIT License
49 stars 7 forks source link

Remove `.yarn/cache` from version control #381

Closed flacial closed 8 months ago

flacial commented 9 months ago

Overview

While reviewing the codebase, I noticed that the .yarn/cache folder is getting tracked by the version control system and this folder contains a cache of all the packages installed using Yarn. This folder can get large quickly over time, making cloning/pulling from the repo slow. Caused by #363.

Proposal

  1. Add .yarn/cache to the .gitignore file
  2. Remove the currently tracked folder .yarn/cache from the repo using git rm -r --cached .yarn/cache

I'll be more than happy to create a PR that applies the above proposal!

malsmr commented 8 months ago

Is this ticket ready to be picked up?

rahulgi commented 8 months ago

@flacial thanks for opening this ticket. We include the .yarn/cache folder intentionally (per the Offline Caching strategy recommended by yarn here). While it makes cloning the repo a bit slower (and you reduce that time by doing git clone --depth=0 the first time you clone it, it also saves time when doing an initial yarn install. If you wanted to create a PR that updates the README to note that you can reduce the depth of the initial clone to download the repo faster, that would certainly be appreciated!