obtain validatornu release from npm
This commit is contained in:
parent
2913932810
commit
c772b17f79
18
.github/workflows/static.yml
vendored
18
.github/workflows/static.yml
vendored
@ -6,9 +6,6 @@ jobs:
|
||||
static:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
VALIDATOR_VERSION: 20.6.30
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -21,25 +18,10 @@ jobs:
|
||||
python-version: '3.10'
|
||||
cache: pip
|
||||
|
||||
- name: Cache validator
|
||||
id: validator-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: vnu-runtime-image
|
||||
key: ${{ runner.os }}-validator-${{ env.VALIDATOR_VERSION }}
|
||||
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get -y install libxml2-utils yajl-tools moreutils zopfli
|
||||
- run: npm install
|
||||
- run: pip install -r requirements.txt
|
||||
|
||||
- name: Download validatornu
|
||||
# There isn't a package with a `validatornu` command in Ubuntu, so download the validator
|
||||
# from the GitHub releases and change the process-static script later to use it.
|
||||
run: curl -OL https://github.com/validator/validator/releases/download/${{ env.VALIDATOR_VERSION }}/vnu.linux.zip && unzip vnu.linux.zip
|
||||
if: steps.validator-cache.outputs.cache-hit != 'true'
|
||||
|
||||
- run: sed -i 's+validatornu+vnu-runtime-image/bin/vnu+g' process-static
|
||||
|
||||
- name: process static
|
||||
run: ./process-static
|
||||
|
16
package-lock.json
generated
16
package-lock.json
generated
@ -10,7 +10,8 @@
|
||||
"html-minifier": "^4.0.0",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"terser": "^5.16.1"
|
||||
"terser": "^5.16.1",
|
||||
"vnu-jar": "^22.9.29"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@ -2569,6 +2570,14 @@
|
||||
"spdx-expression-parse": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vnu-jar": {
|
||||
"version": "22.9.29",
|
||||
"resolved": "https://registry.npmjs.org/vnu-jar/-/vnu-jar-22.9.29.tgz",
|
||||
"integrity": "sha512-AM0mnQEXT5UgT/YoCGy/4KE0i0A4iz9MWUIevzUlYb36UMnsHHQQYnA0ptm971JyaQ5Dg+z3u8AyobotmwkZUQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
@ -4480,6 +4489,11 @@
|
||||
"spdx-expression-parse": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"vnu-jar": {
|
||||
"version": "22.9.29",
|
||||
"resolved": "https://registry.npmjs.org/vnu-jar/-/vnu-jar-22.9.29.tgz",
|
||||
"integrity": "sha512-AM0mnQEXT5UgT/YoCGy/4KE0i0A4iz9MWUIevzUlYb36UMnsHHQQYnA0ptm971JyaQ5Dg+z3u8AyobotmwkZUQ=="
|
||||
},
|
||||
"which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
|
@ -5,6 +5,7 @@
|
||||
"html-minifier": "^4.0.0",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"terser": "^5.16.1"
|
||||
"terser": "^5.16.1",
|
||||
"vnu-jar": "^22.9.29"
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ sed -i "$replace" static-tmp/releases.html
|
||||
gixy nginx-tmp/nginx.conf
|
||||
|
||||
xmllint --noout static-tmp/**/*.html
|
||||
validatornu --errors-only --also-check-css --also-check-svg static-tmp/**/!(bimi).@(css|html|svg)
|
||||
java -jar node_modules/vnu-jar/build/dist/vnu.jar --errors-only --also-check-css --also-check-svg static-tmp/**/!(bimi).@(css|html|svg)
|
||||
find static-tmp -name '*.html' -exec html-minifier --collapse-whitespace \
|
||||
--process-scripts "application/ld+json" --collapse-boolean-attributes \
|
||||
--remove-attribute-quotes --remove-comments --remove-empty-attributes \
|
||||
|
Loading…
x
Reference in New Issue
Block a user