gulp-html-validate
Validate files with html-validate validator.
Installation
> npm install --save-dev gulp-html-validate
Usage
const gulp = ;const htmlvalidate = ; exports { return gulp /* * Aaply the `html-validate` report to each file object, so these * reports can be used by other modules. */ /* * Output `html-validate` results to the console. */ /* * Make gulp to exit with an error code if any error(s) occurred. */ ;};
API
htmlvalidate()
Apply html-validate report to each file.
format(formatter)
Print a report where all errors/warnings are listed. This function should be used in the stream after piping through htmlvalidate
function; otherwise, it will find no html-validate
results to format.
The formatter
parameter is a string, which defined the formatter name to use.
Any formatter supported by html-validate
can be used. The stylish
formatter is used by default.
failAfterError()
Throw an error if html-validate
found an error in any file. All files will be processed before throwing an error.
License
Licensed under the MIT License.