File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
commands/web/woodoo_components Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ elif [[ $1 == "hyva-npm-update" && $2 == "" ]]; then
75
75
done
76
76
fi
77
77
78
- # A command to check outdated npm dependencies for a specific theme
79
- if [[ $1 == " check -npm-deps " && $2 != " " ]]; then
78
+ # A command to check outdated npm dependencies for a specific Hyvä theme
79
+ if [[ $1 == " hyva -npm-check " && $2 != " " ]]; then
80
80
THEME_TO_CHECK=$( grep -oP " (?<=${2} : ).*" " ${PROJECT_CONFIG_FILE} " | cut -d ' ' -f 1 | tr -d ' "' )
81
81
checkHyva " ${THEME_TO_CHECK} "
82
82
if [[ ${HYVA} == true ]]; then
@@ -85,4 +85,18 @@ if [[ $1 == "check-npm-deps" && $2 != "" ]]; then
85
85
echo -e " ${txtred}${ICON_ERROR} ${2} is not a Hyvä theme. Please check manually.${txtrst} "
86
86
fi
87
87
exit 0
88
+ elif [[ $1 == " hyva-npm-check" && $2 == " " ]]; then
89
+ checkThemePathExists silent
90
+ THEMES_TO_CHECK=$( gum choose --cursor-prefix " [ ] " --unselected-prefix " [ ] " --selected-prefix " [✓] " --no-limit $THEMES_IN_CONFIG )
91
+ for THEME_CODE in ${THEMES_TO_CHECK} ; do
92
+ THEMES_TO_CHECK=$( echo $( grep -oP ' (?<=' $THEME_CODE ' : ).*' $PROJECT_CONFIG_FILE ) | cut -d ' ' -f 1 | sed ' s/"//g' )
93
+
94
+ # checks to figure out if it is a Hyvä Theme
95
+ checkHyva " ${THEMES_TO_CHECK} "
96
+ if [[ ${HYVA} == true ]]; then
97
+ checkNpmDeps " ${THEMES_TO_CHECK} "
98
+ else
99
+ echo -e " ${txtred}${ICON_ERROR} ${THEME_CODE} is not a Hyvä theme. Please check manually.${txtrst} "
100
+ fi
101
+ done
88
102
fi
You can’t perform that action at this time.
0 commit comments