Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jyap808/e838dd2abfdd1f1680102eed5aee8416 to your computer and use it in GitHub Desktop.
Save jyap808/e838dd2abfdd1f1680102eed5aee8416 to your computer and use it in GitHub Desktop.
Upgrade Yarn dependencies (and update package.json)
jq '.dependencies | keys | .[]' package.json | xargs yarn add
jq '.devDependencies | keys | .[]' package.json | xargs yarn add --dev

FROM: yarnpkg/yarn#3266 (comment)

Install Yarn for every NVM install

Create a text file at $NVM_DIR/default-packages, usually it is located at ~/.nvm/default-packages, with a list of npm packages to be installed. The content may looks like the following:

yarn

FROM: https://stackoverflow.com/a/61175494/603745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment