updated yarn shell script
This commit is contained in:
14
yarn2.sh
14
yarn2.sh
@@ -7,18 +7,16 @@ printf "\n###Yarn 2" >> "$dir/.gitignore"
|
||||
printf "\n.yarn/*" >> "$dir/.gitignore"
|
||||
printf "\n!.yarn/releases" >> "$dir/.gitignore"
|
||||
printf "\n!.yarn/plugins" >> "$dir/.gitignore"
|
||||
printf "\n.pnp.*" >> "$dir/.gitignore"
|
||||
|
||||
# removes node_modules
|
||||
rm -rf node_modules
|
||||
|
||||
# Upgrade Yarn to Berry (latest Yarn 2 version known to Yarn 1)
|
||||
yarn set version berry
|
||||
|
||||
# Upgrade Yarn Berry to latest version now that Yarn knows where to download it from
|
||||
yarn set version latest
|
||||
|
||||
# (optional) Set nodeLinker to node-modules - this 100% guarantees backwards compatibility
|
||||
yarn config set nodeLinker node-modules
|
||||
|
||||
# (optional) Adds `yarn upgrade-interactive` command back
|
||||
yarn plugin import interactive-tools
|
||||
|
||||
# Reinstalls project using Yarn 2. This will also update your yarn.lock file, but will NOT sneakily upgrade the dependencies
|
||||
yarn
|
||||
# Re-installs project using Yarn 2. This will also update your yarn.lock file, but will NOT sneakily upgrade the dependencies
|
||||
yarn install
|
Reference in New Issue
Block a user