@digitoimistodude/code-quality-checks 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +18 -14
- package/package.json +1 -1
package/.husky/pre-commit
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Ref: DEV-177, DEV-373, DEV-623
|
|
3
3
|
|
|
4
4
|
# Version:
|
|
5
|
-
VERSION="2.0.
|
|
5
|
+
VERSION="2.0.2 (2025-12-04)"
|
|
6
6
|
|
|
7
7
|
# Load configuration
|
|
8
8
|
# First check for local project config, then fall back to package default
|
|
@@ -172,21 +172,25 @@ echo "${GREEN}${CHECK} OK${NC}"
|
|
|
172
172
|
# Check for gulpfile.js - location depends on context
|
|
173
173
|
if [ "$CONTEXT" = "dudestack" ]; then
|
|
174
174
|
# In dudestack, gulpfile.js is in themes
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
175
|
+
# Skip check if no themes exist yet (fresh dudestack template)
|
|
176
|
+
theme_count=$(find content/themes -maxdepth 1 -mindepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
|
|
177
|
+
if [ "$theme_count" -gt 0 ]; then
|
|
178
|
+
printf " ${ARROW} Checking for gulpfile.js in themes... "
|
|
179
|
+
gulpfile_found=false
|
|
180
|
+
for theme_dir in content/themes/*/; do
|
|
181
|
+
if [ -f "${theme_dir}gulpfile.js" ]; then
|
|
182
|
+
gulpfile_found=true
|
|
183
|
+
break
|
|
184
|
+
fi
|
|
185
|
+
done
|
|
186
|
+
if [ "$gulpfile_found" = false ]; then
|
|
187
|
+
echo "${RED}${CROSS} FAILED${NC}"
|
|
188
|
+
echo " ${RED}gulpfile.js is missing from theme directories${NC}"
|
|
189
|
+
echo " ${YELLOW}Please ensure Gulp is properly set up in your theme${NC}"
|
|
190
|
+
exit 1
|
|
181
191
|
fi
|
|
182
|
-
|
|
183
|
-
if [ "$gulpfile_found" = false ]; then
|
|
184
|
-
echo "${RED}${CROSS} FAILED${NC}"
|
|
185
|
-
echo " ${RED}gulpfile.js is missing from theme directories${NC}"
|
|
186
|
-
echo " ${YELLOW}Please ensure Gulp is properly set up in your theme${NC}"
|
|
187
|
-
exit 1
|
|
192
|
+
echo "${GREEN}${CHECK} OK${NC}"
|
|
188
193
|
fi
|
|
189
|
-
echo "${GREEN}${CHECK} OK${NC}"
|
|
190
194
|
else
|
|
191
195
|
# In standalone theme, gulpfile.js is in root
|
|
192
196
|
printf " ${ARROW} Checking for gulpfile.js... "
|