hakurei.app/validate_static
2020-11-17 17:36:16 -05:00

16 lines
396 B
Bash
Executable File

#!/bin/bash
set -o errexit -o nounset -o pipefail
shopt -s dotglob extglob globstar
export PATH="$PWD/node_modules/.bin:$PATH"
for file in static/**/*.@(json|webmanifest); do
json_verify < "$file" >/dev/null
done
xmllint --noout static/**/*.@(html|svg|xml)
eslint static/**/*.js
stylelint static/**/*.css
validatornu --Werror --also-check-css --also-check-svg static/**/*.@(css|html|svg)