@@ -59,29 +59,53 @@ front-build:
5959 fi
6060
6161lintval :
62- @echo " Running theme linters..."
63- docker pull $(IMAGE_FRONT )
64- $(call frontexec, yarn run lint)
62+ @if [ -d $( shell pwd) /web/themes/custom/$( THEME_NAME) ]; then \
63+ echo " - Theme directory found. Running theme linters..." ; \
64+ docker pull $(IMAGE_FRONT ) ; \
65+ $(call frontexec, node -v) ; \
66+ $(call frontexec, yarn -v) ; \
67+ $(call frontexec, yarn run lint) ; \
68+ else \
69+ echo " - Theme directory defined in .env file was not found. Skipping theme linters." ; \
70+ fi
6571
6672lint :
67- @echo " Running theme linters with fix..."
68- docker pull $(IMAGE_FRONT )
69- $(call frontexec, yarn install --ignore-optional --check-files --prod)
70- $(call frontexec, yarn lint-fix)
73+ @if [ -d $( shell pwd) /web/themes/custom/$( THEME_NAME) ]; then \
74+ echo " - Theme directory found. Running theme linters with fix..." ; \
75+ docker pull $(IMAGE_FRONT ) ; \
76+ $(call frontexec, node -v) ; \
77+ $(call frontexec, yarn -v) ; \
78+ $(call frontexec, yarn install --ignore-optional --check-files --prod) ; \
79+ $(call frontexec, yarn lint-fix) ; \
80+ else \
81+ echo " - Theme directory defined in .env file was not found. Skipping theme linters with fix." ; \
82+ fi
7183
7284storybook :
73- @echo " Running dynamic storybook..."
74- docker pull $(IMAGE_FRONT )
75- $(call frontexec, yarn install --ignore-optional --check-files)
76- $(call frontexec, yarn run build) ;
77- $(call frontexec-with-port, yarn storybook -p $(FRONT_PORT ) )
85+ @if [ -d $( shell pwd) /web/themes/custom/$( THEME_NAME) ]; then \
86+ echo " - Theme directory found. Running dynamic storybook..." ; \
87+ docker pull $(IMAGE_FRONT ) ; \
88+ $(call frontexec, node -v) ; \
89+ $(call frontexec, yarn -v) ; \
90+ $(call frontexec, yarn install --ignore-optional --check-files) ; \
91+ $(call frontexec, yarn run build) ; \
92+ $(call frontexec-with-port, yarn storybook -p $(FRONT_PORT ) ) ; \
93+ else \
94+ echo " - Theme directory defined in .env file was not found. Skipping dynamic storybook." ; \
95+ fi
7896
7997build-storybook :
80- @echo " Export static storybook..."
81- docker pull $(IMAGE_FRONT )
82- $(call frontexec, yarn install --ignore-optional --check-files)
83- $(call frontexec, yarn run build) ;
84- $(call frontexec, yarn run build-storybook)
98+ @if [ -d $( shell pwd) /web/themes/custom/$( THEME_NAME) ]; then \
99+ echo " - Theme directory found. Exporting static storybook..." ; \
100+ docker pull $(IMAGE_FRONT ) ; \
101+ $(call frontexec, node -v) ; \
102+ $(call frontexec, yarn -v) ; \
103+ $(call frontexec, yarn install --ignore-optional --check-files) ; \
104+ $(call frontexec, yarn run build) ; \
105+ $(call frontexec, yarn run build-storybook) ; \
106+ else \
107+ echo " - Theme directory defined in .env file was not found. Skipping dynamic storybook." ; \
108+ fi
85109
86110create-component :
87111 @echo " Create component CLI dialog... It assumed that you already have 'make storybook' or 'make build-storybook' finished"
0 commit comments