Skip to content

Replace grunt-html with htmlhint #1274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,22 @@ module.exports = function(grunt) {
dest: 'p5-reference/'
}
},
htmllint: {
all: {

htmlhint: {
html1: {
options: {
'attr-value-double-quotes': false,
'alt-require': true,
'doctype-first': true,
'title-require': true,
'attr-no-duplication': true,
'input-requires-label': true,
'tags-check': true,
'tagname-lowercase': true,
'tagname-specialchars': true,
'empty-tag-not-self-closed': true,
'id-unique': true
},
src: [
'<%= config.dist %>/**/*.html',
'!<%= config.dist %>/**/CHANGES.html',
Expand All @@ -352,17 +366,10 @@ module.exports = function(grunt) {
'!<%= config.dist %>/**/learn/*.html',
'!<%= config.dist %>/**/examples/*.html',
'!<%= config.dist %>/**/reference/assets/index.html'
],
options: {
ignore: [
/^This document appears to be written in English/,
/^Bad value “https:/,
/^Consider adding a “lang” attribute to the “html”/,
/^Attribute “paypalexpress” not allowed on element “script” at this point./
]
}
]
}
},

shell: {
generate_dataJSON: {
command: `git checkout ${grunt.option('target')} && npm ci && npm run grunt yui build`,
Expand Down Expand Up @@ -402,7 +409,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-file-append');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-html');
grunt.loadNpmTasks('grunt-htmlhint');

// i18n tracking task
grunt.registerTask('i18n', function() {
Expand Down Expand Up @@ -495,7 +502,7 @@ module.exports = function(grunt) {
'file_append',
'compress',
'i18n',
'htmllint'
'htmlhint'
]);

// runs with just grunt command
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Other Language Steward(s):

## Setup

0. Ensure Java is installed. Not installed? Head over to [Java](https://www.oracle.com/java/technologies/downloads/) for installation.
1. Install [node.js](https://nodejs.org/en/download/).
2. Clone this repo by typing ```git clone https://github.com/processing/p5.js-website/``` in terminal.
3. Navigate to the `p5.js-website` directory in the terminal and type `npm install`.
Expand Down
Loading