summaryrefslogtreecommitdiff
path: root/validate-static
blob: 8776be9921881bc1976764d9bf12cb26e9706eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -o errexit -o nounset -o pipefail
shopt -s dotglob extglob globstar

export PATH="$PWD/node_modules/.bin:$PATH"

rm -rf static-tmp
cp -a static static-tmp
rm -rf static-tmp/js/fastboot/{!(dist),dist/!(fastboot.min.mjs|fastboot.min.mjs.map|vendor)}

for file in static-tmp/**/*.@(json|webmanifest); do
    json_verify < "$file" >/dev/null
done

xmllint --noout static-tmp/**/*.@(html|svg|xml)
eslint static-tmp/**/!(fastboot.min.m|z-worker-pako.|pako_inflate.min.|)js
stylelint static-tmp/**/*.css
validatornu --Werror --also-check-css --also-check-svg static-tmp/**/!(bimi).@(css|html|svg)