Skip to content

Commit 44b8de7

Browse files
authored
Merge pull request #1274 from limzykenneth/replace-grunt-html
Replace grunt-html with htmlhint
2 parents d973b07 + 1b9c76e commit 44b8de7

File tree

4 files changed

+253
-72
lines changed

4 files changed

+253
-72
lines changed

Gruntfile.js

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,22 @@ module.exports = function(grunt) {
342342
dest: 'p5-reference/'
343343
}
344344
},
345-
htmllint: {
346-
all: {
345+
346+
htmlhint: {
347+
html1: {
348+
options: {
349+
'attr-value-double-quotes': false,
350+
'alt-require': true,
351+
'doctype-first': true,
352+
'title-require': true,
353+
'attr-no-duplication': true,
354+
'input-requires-label': true,
355+
'tags-check': true,
356+
'tagname-lowercase': true,
357+
'tagname-specialchars': true,
358+
'empty-tag-not-self-closed': true,
359+
'id-unique': true
360+
},
347361
src: [
348362
'<%= config.dist %>/**/*.html',
349363
'!<%= config.dist %>/**/CHANGES.html',
@@ -352,17 +366,10 @@ module.exports = function(grunt) {
352366
'!<%= config.dist %>/**/learn/*.html',
353367
'!<%= config.dist %>/**/examples/*.html',
354368
'!<%= config.dist %>/**/reference/assets/index.html'
355-
],
356-
options: {
357-
ignore: [
358-
/^This document appears to be written in English/,
359-
/^Bad value https:/,
360-
/^Consider adding a lang attribute to the html/,
361-
/^Attribute paypalexpress not allowed on element script at this point./
362-
]
363-
}
369+
]
364370
}
365371
},
372+
366373
shell: {
367374
generate_dataJSON: {
368375
command: `git checkout ${grunt.option('target')} && npm ci && npm run grunt yui build`,
@@ -402,7 +409,7 @@ module.exports = function(grunt) {
402409
grunt.loadNpmTasks('grunt-file-append');
403410
grunt.loadNpmTasks('grunt-contrib-compress');
404411
grunt.loadNpmTasks('grunt-contrib-requirejs');
405-
grunt.loadNpmTasks('grunt-html');
412+
grunt.loadNpmTasks('grunt-htmlhint');
406413

407414
// i18n tracking task
408415
grunt.registerTask('i18n', function() {
@@ -495,7 +502,7 @@ module.exports = function(grunt) {
495502
'file_append',
496503
'compress',
497504
'i18n',
498-
'htmllint'
505+
'htmlhint'
499506
]);
500507

501508
// runs with just grunt command

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Other Language Steward(s):
4646

4747
## Setup
4848

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

0 commit comments

Comments
 (0)