From c29c07e1beeb65699c42bf9d6ba8ba429f34388b Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 6 Jul 2020 15:28:42 -0400 Subject: [PATCH] node apps use their own cache directory to avoid collisions when building --- apps/files/bin/setup | 3 ++- apps/shell/bin/setup | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/files/bin/setup b/apps/files/bin/setup index c34c623398..a07cf38596 100755 --- a/apps/files/bin/setup +++ b/apps/files/bin/setup @@ -6,6 +6,7 @@ include FileUtils # path to your application root. APP_ROOT = Pathname.new File.expand_path("../../", __FILE__) +CACHE = "#{ENV['HOME']}/.cache/yarn/ood-files-app" chdir APP_ROOT do # This script is a starting point to setup your application. @@ -28,7 +29,7 @@ chdir APP_ROOT do puts "\n== Installing dependencies ==" rm_rf "node_modules" sh "npm install --production --prefix tmp yarn" - sh "tmp/node_modules/yarn/bin/yarn --production install" + sh "tmp/node_modules/yarn/bin/yarn --production install --cache-folder #{CACHE}" puts "\n== Restarting application server ==" touch "tmp/restart.txt" diff --git a/apps/shell/bin/setup b/apps/shell/bin/setup index e29a80277e..7c3b56f15e 100755 --- a/apps/shell/bin/setup +++ b/apps/shell/bin/setup @@ -6,6 +6,7 @@ include FileUtils # path to your application root. APP_ROOT = Pathname.new File.expand_path("../../", __FILE__) +CACHE = "#{ENV['HOME']}/.cache/yarn/ood-shell-app" chdir APP_ROOT do # This script is a starting point to setup your application. @@ -16,7 +17,7 @@ chdir APP_ROOT do puts "\n== Installing dependencies ==" rm_rf "node_modules" sh "npm install --production --prefix tmp yarn" - sh "tmp/node_modules/yarn/bin/yarn --production install --flat" + sh "tmp/node_modules/yarn/bin/yarn --production install --flat --cache-folder #{CACHE}" puts "\n== Restarting application server ==" touch "tmp/restart.txt"