From f3a97ad441448b2fb49e5d444e0885b3038b22c2 Mon Sep 17 00:00:00 2001 From: Nick Janetakis Date: Fri, 3 Jan 2025 07:51:51 -0500 Subject: [PATCH] Run package manager commands independently --- run | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/run b/run index d1d5994..8d0eef5 100755 --- a/run +++ b/run @@ -20,6 +20,10 @@ function _dc { docker compose "${DC}" ${TTY} "${@}" } +function _dc_run { + DC="run" _dc --no-deps --rm "${@}" +} + # ----------------------------------------------------------------------------- function cmd { @@ -75,8 +79,8 @@ function deps:install { [ -z "${no_build}" ] && docker compose down && docker compose build - DC="run" _dc --no-deps --rm js yarn install - DC="run" _dc --no-deps --rm web yarn install + _dc_run js yarn install + _dc_run web yarn install } function yarn { @@ -85,7 +89,7 @@ function yarn { function yarn:outdated { # List any installed packages that are outdated - yarn outdated + _dc_run web yarn outdated } function yarn:frontend { @@ -94,7 +98,7 @@ function yarn:frontend { function yarn:outdated:frontend { # List any installed front-end packages that are outdated - yarn:frontend outdated + _dc_run js yarn outdated } function yarn:build:js {