File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
commands/web/woodoo_components Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ function checkNpmDeps() {
5151 cd - > /dev/null || exit
5252}
5353
54- # A command to update npm dependencies for a specific theme
55- if [[ $1 == " update -npm-deps " && $2 != " " ]]; then
54+ # A command to update npm dependencies for a specific Hyvä theme
55+ if [[ $1 == " hyva -npm-update " && $2 != " " ]]; then
5656 THEME_TO_UPDATE=$( grep -oP " (?<=${2} : ).*" " ${PROJECT_CONFIG_FILE} " | cut -d ' ' -f 1 | tr -d ' "' )
5757 checkHyva " ${THEME_TO_UPDATE} "
5858 if [[ ${HYVA} == true ]]; then
@@ -61,6 +61,18 @@ if [[ $1 == "update-npm-deps" && $2 != "" ]]; then
6161 echo -e " ${txtred}${ICON_ERROR} ${2} is not a Hyvä theme. Please update manually.${txtrst} "
6262 fi
6363 exit 0
64+ elif [[ $1 == " hyva-npm-update" && $2 == " " ]]; then
65+ checkThemePathExists silent
66+ THEMES_TO_UPDATE=$( gum choose --cursor-prefix " [ ] " --unselected-prefix " [ ] " --selected-prefix " [✓] " --no-limit $THEMES_IN_CONFIG )
67+ for THEME_CODE in ${THEMES_TO_UPDATE} ; do
68+ THEMES_TO_UPDATE=$( echo $( grep -oP ' (?<=' $THEME_CODE ' : ).*' $PROJECT_CONFIG_FILE ) | cut -d ' ' -f 1 | sed ' s/"//g' )
69+ checkHyva " ${THEMES_TO_UPDATE} "
70+ if [[ ${HYVA} == true ]]; then
71+ checkNpmDeps " ${THEMES_TO_UPDATE} "
72+ else
73+ echo -e " ${txtred}${ICON_ERROR} ${THEME_CODE} is not a Hyvä theme. Please check manually.${txtrst} "
74+ fi
75+ done
6476fi
6577
6678# A command to check outdated npm dependencies for a specific theme
You can’t perform that action at this time.
0 commit comments