hakurei.app/validate_static
Danny Lin 890abfdaff Update web installer for fastboot.js updates
Some of the API and paths have changed, so this needs to be updated
accordingly. The most prominent change is the removal of BlobStore and
downloading support from fastboot.js, because a fastboot library should
not be responsible for downloading files.
2021-01-27 20:24:49 -05:00

20 lines
577 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"
rm -rf static_tmp
cp -a static static_tmp
rm -rf static_tmp/js/fastboot/{!(dist),dist/!(fastboot.min.mjs|libs)}
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/**/*.@(css|html|svg)