From 6be45b2728d8e3f29cc015b3de4a9fcb091bcce0 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Mon, 7 Feb 2022 18:20:36 +0100 Subject: [PATCH] updated yarn install script --- yarn2.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/yarn2.sh b/yarn2.sh index 70fed42..def47a5 100755 --- a/yarn2.sh +++ b/yarn2.sh @@ -2,6 +2,11 @@ dir=$(pwd) # shellcheck disable=SC2129 +printf "\n" +printf "|##########################################|" +printf "| Write to gitignore |" +printf "|##########################################|" +printf "\n" printf "\n" >> "$dir/.gitignore" printf "\n###Yarn 2" >> "$dir/.gitignore" printf "\n.yarn/*" >> "$dir/.gitignore" @@ -10,13 +15,33 @@ printf "\n!.yarn/plugins" >> "$dir/.gitignore" printf "\n.pnp.*" >> "$dir/.gitignore" # removes node_modules +printf "\n" +printf "|##########################################|" +printf "| Delete node_modules |" +printf "|##########################################|" +printf "\n" rm -rf node_modules # Upgrade Yarn to Berry (latest Yarn 2 version known to Yarn 1) +printf "\n" +printf "|##########################################|" +printf "| Set version berry |" +printf "|##########################################|" +printf "\n" yarn set version berry # (optional) Adds `yarn upgrade-interactive` command back +printf "\n" +printf "|##########################################|" +printf "| Add interactive-tools |" +printf "|##########################################|" +printf "\n" yarn plugin import interactive-tools # Re-installs project using Yarn 2. This will also update your yarn.lock file, but will NOT sneakily upgrade the dependencies +printf "\n" +printf "|##########################################|" +printf "| Yarn install |" +printf "|##########################################|" +printf "\n" yarn install \ No newline at end of file