diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e631f61c5..f9cc93cdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} ${{ runner.OS }}-node-v${{ env.NODE }}- + - run: java -version + - name: Install npm dependencies run: npm ci diff --git a/Gruntfile.js b/Gruntfile.js index 8b5f4ea7a..1c5109aea 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,6 +51,7 @@ module.exports = grunt => { grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-sass'); + grunt.loadNpmTasks('grunt-html'); // Force use of Unix newlines grunt.util.linefeed = '\n'; @@ -148,6 +149,21 @@ module.exports = grunt => { dest: '' } }, + htmllint: { + options: { + ignore: [ + /Attribute “autocomplete” is only allowed when the input type is.*/, + /Attribute “autocomplete” not allowed on element “button” at this point./, + /Bad value “” for attribute “action” on element “form”./ + ] + }, + src: [ + 'docs/**/*.html', + '!docs/**/bower_components/**/*.html', + '!docs/_vendor/**/*.html', + '!docs/2/**/*.html' + ] + }, connect: { options: { hostname: 'localhost', @@ -238,6 +254,7 @@ module.exports = grunt => { }); grunt.registerTask('vendor', 'copy:vendor'); + grunt.registerTask('docs-css', ['sass:docs', 'postcss:docs']); grunt.registerTask('server', 'connect:keepalive'); diff --git a/package-lock.json b/package-lock.json index 6e7c01a2e..1f6ab977e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2308,6 +2308,75 @@ } } }, + "grunt-html": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/grunt-html/-/grunt-html-14.2.0.tgz", + "integrity": "sha512-Ir4n4axiY/FHrv9v1XhfaehSrRqZ1PYTRDaTIY5VxeaIsAm4KlYjr+hyrq+gwqyaD/iiWznOBE22c6U5si5WEQ==", + "dev": true, + "requires": { + "async": "^3.2.0", + "chalk": "^4.1.0", + "vnu-jar": "20.6.30" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "grunt-known-options": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", @@ -6112,6 +6181,12 @@ "unist-util-stringify-position": "^2.0.0" } }, + "vnu-jar": { + "version": "20.6.30", + "resolved": "https://registry.npmjs.org/vnu-jar/-/vnu-jar-20.6.30.tgz", + "integrity": "sha512-zlNNe7jW6cTIrxVlZK9AcZiNWjxzjqi7LpTafBCi4OY4bsh2uyGhxXT2l6hZ3ibpxP0ZC/pQsBpFQEACS0ePIg==", + "dev": true + }, "websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", diff --git a/package.json b/package.json index d4d446da1..cbce46eb6 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,9 @@ }, "scripts": { "build": "grunt swatch", + "htmllint": "grunt htmllint", "stylelint": "stylelint \"{build,dist,docs/_assets}/**/*.scss\" --rd", - "test": "npm run stylelint" + "test": "npm run stylelint && npm run htmllint" }, "files": [ "dist/**/*.{css,scss}" @@ -33,6 +34,7 @@ "grunt-contrib-copy": "^1.0.0", "grunt-contrib-cssmin": "^3.0.0", "grunt-contrib-watch": "^1.1.0", + "grunt-html": "^14.2.0", "grunt-sass": "^3.1.0", "jquery": "^3.5.1", "node-sass": "^4.14.1",