Browse Source

update to vent, add validation

main
John-Mark Gurney 2 years ago
parent
commit
28f833069d
1 changed files with 16 additions and 1 deletions
  1. +16
    -1
      Makefile

+ 16
- 1
Makefile View File

@@ -1,7 +1,22 @@
.PHONY: env .PHONY: env


VNU_RELEASE=20.6.30
VNU_URL=https://github.com/validator/validator/releases/download/$(VNU_RELEASE)/vnu.jar_$(VNU_RELEASE).zip

vnu.jar_$(VNU_RELEASE).zip:
wget $(VNU_URL)

vnu.jar: vnu.jar_$(VNU_RELEASE).zip
unzip -p $< dist/vnu.jar > $@ || (rm "$@"; false)

.PHONY: validate
validate: vnu.jar
hyde gen
java -jar vnu.jar --also-check-css --stdout $$(find deploy -name '*.html' -o -name '*.css') | egrep -v 'Section lacks heading|Article lacks heading|Consider using the “h1” element as a top-level heading only' || true
#java -jar vnu.jar --svg --stdout $$(find deploy -name '*.svg') | egrep -v 'The value of attribute “unicode” on element “glyph” from namespace “http://www.w3.org/2000/svg” is not in Unicode Normalization Form C.' || true

env: env:
(virtualenv p && . ./p/bin/activate && pip install -r requirements.txt)
(python3 -m venv p && . ./p/bin/activate && pip install -r requirements.txt)


.PHONY: deploy .PHONY: deploy




Loading…
Cancel
Save