summaryrefslogtreecommitdiff
path: root/validate_static
blob: a14ac1010ed68355b6f1c279bad15d267fcaf2ee (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/{.git,demo,README.md}

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

xmllint --noout static_tmp/**/*.@(html|svg|xml)
eslint static_tmp/**/!(zip.min|z-worker).js
stylelint static_tmp/**/*.css
validatornu --Werror --also-check-css --also-check-svg static_tmp/**/*.@(css|html|svg)