diff --git a/make/htdocs.mk b/make/htdocs.mk index 9e7a55b8..4d45d509 100644 --- a/make/htdocs.mk +++ b/make/htdocs.mk @@ -5,9 +5,12 @@ LESS_CPY ?= lesscpy include $(JWBDIR)/make/defs.mk # -- HTML +PRETTIER := $(shell $(WHICH) prettier 2>/dev/null) INSTALLATION_FILE_TYPES += HTML BUILD_HTMLDIR = $(TOPDIR)/htdocs LOCAL_HTML += $(filter-out $(DONT_INSTALL),$(wildcard *.html *.css *.php *.js) $(FONTS) $(IMAGES)) +DONT_LINT_HTML += $(shell $(ECHO) $(wildcard *.html) | xargs --no-run-if-empty $(GREP) -l '/dev/null +endif + touch $@ + +.%.php.lint: %.php + php -l $< + touch $@ + +.%.css.lint: %.css +ifneq ($(PRETTIER),) + $(PRETTIER) $< >/dev/null +endif + touch $@ + +.%.js.lint: %.js +ifneq ($(PRETTIER),) + $(PRETTIER) $< >/dev/null +endif + touch $@