An html-validate.org plugin for webpack
This plugin is a simple wrapper around the html-validate.org cli for automatic validation after each webpack compilation.
npm i -D html-validate-webpack-pluginnpm i -g html-validateNote: You must have html-validate installed globally and create a .htmlvalidate.json at the project root with your configurations.
In your webpack configuration (development builds):
const HtmlValidatePlugin = require('html-validate-webpack-plugin');
module.exports = {
plugins: [
new HtmlValidatePlugin(),
],
};You can pass select html-validate.org cli options.
- Type:
String - Default:
'src/**/*'
Specifies the directories/files for html-validate to search.
- Type:
array - Default:
['html']
Specifies the file extensions to use when searching for files in directories.
- Type:
String - Default:
'.htmlvalidate.json'
Specify a different configuration file.
Note: For your custom configuration omit the .json extension and supply the name only.
html-validateperforms all validation locally which means you can usehtml-validateandhtml-validate-webpack-pluginoffline.html-validate-webpack-plugincontains minimal dependencies.
MIT